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($tp
I'm using FPDI to add some stuff to some existing PDF documents. Works great,
except that it's slightly changing the size of the PDF document (the physical
page size, not the file size), which is unacceptable since this is for a
high-end print file. I've stripped out all the code to the bare bon
2 matches
Mail list logo