Re: Help, FPDI is changing the size of my PDFs

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

 



Solved it. Here's the solution:

$pdf = new fpdi();
$pdf->setSourceFile('D:\\DocShare\\'.$filename);
$tplidx = $pdf->ImportPage(1);
$s = $pdf->getTemplatesize($tplidx);
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L', array($s['w'], $s['h'])); // This gets it the right dimensions
$pdf->useTemplate($tplidx, 0, 0, 0, 0, true);
$pdf->Output('newpdf.pdf', 'D');



-- 
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