RE: [PHP] jpg to pdf using fpdf
| From: | Peter Lauri | Date: | Wed, 26 Jul 2006 08:49:22 +0000 |
| Subject: | RE: [PHP] jpg to pdf using fpdf | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-239813@lists.php.net to get a copy of this message | ||
Check the FPDF function in the manual http://www.fpdf.org/en/doc/fpdf.htm, I
think you can set custom size of the PDF. You have to figure out how to get
the image size first, hint: getImageSize();), and then convert it to the
units you use for the pdf.
-----Original Message-----
From: nicolas figaro [mailto:nfigaro@sdv.fr]
Sent: Wednesday, July 26, 2006 8:44 PM
To: PHP List
Subject: Re: [PHP] jpg to pdf using fpdf
Peter Lauri a écrit :
> This is code how it works for me:
>
> $pdf =& new FPDF('p','pt','a4');
> $pdf->AddPage();
> $pdf->Image("pdf/profilechart.png",145,$pdf->GetY());
> $pdf->Output("pdf/temp/thepdf.pdf",'F');
>
> Add the $pdf->AddPage(); and it might work :)
>
>
addpage did the trick.
thanks peter.
next question : how to set the pdf size to the size of the image ? :)
N F