Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TCPDF output without saving file

Tags:

php

pdf

tcpdf

How to use TCPDF to output pdf file in browser without saving like in ezpdf?

like image 471
Mirgorod Avatar asked Jan 16 '11 22:01

Mirgorod


People also ask

What is Tcpdf error?

Any error stating 'TCPDF' means that there was a problem with the generation of the PDF file.

How do I upload an image to Tcpdf?

$tcpdf = new TCPDF_TCPDF(); $img = file_get_contents(Mage::getBaseDir('media') . '/dhl/logo. jpg'); $PDF_HEADER_LOGO = $tcpdf->Image('@' . $img);//any image file.


1 Answers

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');

like image 190
Alec Avatar answered Sep 23 '22 08:09

Alec