RE: jpg to pdf using fpdf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx] 
Sent: Wednesday, July 26, 2006 8:44 PM
To: PHP List
Subject: Re:  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux