开发者

TCPDF library in JOOMLA! component outputs html in PDF

开发者 https://www.devze.com 2023-01-31 22:45 出处:网络
I have a component in joomla that exports to PDF, the problem that i\'m encountering is that the PDF exported is unreadable because the html of the Joomla! page in inserted after and before the pdf it

I have a component in joomla that exports to PDF, the problem that i'm encountering is that the PDF exported is unreadable because the html of the Joomla! page in inserted after and before the pdf itself.

I have made a standard structure of a component and call it like

index.php?option=com_listado_factura&task开发者_StackOverflow中文版=exportar_pdf

being com_listado_factura the name of the component and exportar_factura the function of the controller that exports to pdf.

I've looked everywhere and couldn't find the solution, thanks


The solution was to call:

ob_end_clean();

before

$tcpdf->output();
0

精彩评论

暂无评论...
验证码 换一张
取 消