Bon je fusionne des docs PDF, et je cherche a ajouter une pagination globale:
mais rien ne ressort sur le document final ???
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14 foreach($pdflist as $filekey=>$filename){ $pdf = Zend_Pdf::load($filename); // $pdfContent is the generated one, got the content... $pnr=0; foreach($pdf->pages as $key=>$page){ $template = clone $page; // cloning the page (a must do) $pnr++; $addpage = new Zend_Pdf_Page($template); // Creating the first page of the merged PDF with the previous content $addpage->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 12); // Draw text $addpage->drawText('Page'.$pnr, 0, 0); $pdf2show->pages[] = $addpage;// Adding this page to the final PDF } }
Partager