TCPDF library in JOOMLA! component outputs html in PDF
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();
精彩评论