Reputation: 746
I am using function draw PDF in zendFreamwork but now i meet problem with many data many page but my pdf
can draw only one page, for more data will lose. so have any solution can draw multi page ?
thanks in advance for helping. I am looking to see your reply soon.
Upvotes: 2
Views: 101
Reputation: 153
PDF object has object pages as an array Zend_Pdf_Page class. You can add multiple pages you like.
$pdf = new Zend_Pdf();
$page1 = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
...
$pdf->pages[] = $page1;
$page2 = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4);
...
$pdf->pages[] = $page2;
$pdf->save('sample.pdf');
Upvotes: 0
Reputation: 5772
I had a similar problem with Zend_PDF about a form.
Is the same variables in all page?
If yes, try, if possible, to use a counter on yours variables, fields ..
before:
$your_var = ...
...
after:
foreach ($pdf_pages as $cpt => $page){
$var = 'your_var'.$cpt;
$$var = ...
...
}
I hope it will help
Upvotes: 0