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

Reply via email to