I'm stuck at work. I am coding in PHP and I need to create a PDF file. My problem is that I have to create cards (credit card size 85.6 * 54 mm), I use the template in the right size, but the page is still created using A4 format. I see my template on this page in the upper left corner, but page A4 fills the rest of my screen. Here is my code.
$pdf = new FPDI();
$pdf->setSourceFile('inc/om.pdf');
$tplIdx = $pdf->importPage(2);
$pdf->AddPage('L', array(85.6,54));
$pdf->useTemplate($tplIdx);
Does anyone have any ideas?
source
share