'FPDF How to create multiples page with FPDM
I need to create one pdf with multiples pages,i tried with FPDF and FPDM
for single page is work good but i tried with this code.. thank you for your help
<?php
require_once('../st-tools/FPDF/fpdf.php');
require_once('../st-tools/FPDF/fpdm.php');
$filename = $_SERVER['DOCUMENT_ROOT']."/serial/100.pdf";
$pdf = new FPDM('../st-tools/TEMPLATES/S100.pdf');
$value1='John';
$value2='100-125';
$myarray = array(1,2,3); // For serialize pdf
foreach($myarray as $value)
{
$fields = array(
'pdf_Testedby'=> ''.$value1.'',
'pdf_WO'=> ''.$value2.'',
'Serie'=> ''.$value.''
);
$pdf->Load($fields, false);
$pdf->Merge();
$pdf->AddPage();
}
$pdf->Output($filename,'F');
$pdf->Output();
?>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
