How to use TCPDF to output pdf file in browser without saving like in ezpdf?
Any error stating 'TCPDF' means that there was a problem with the generation of the PDF file.
$tcpdf = new TCPDF_TCPDF(); $img = file_get_contents(Mage::getBaseDir('media') . '/dhl/logo. jpg'); $PDF_HEADER_LOGO = $tcpdf->Image('@' . $img);//any image file.
Use I
for "inline" to send the PDF to the browser, opposed to F
to save it as a file.
$pdf->Output('name.pdf', 'I');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With