bonjour,
je dois générer des pdfs avec la libraire FPDF, j'ai bien ajouter la librairie dans /library . et j'ai ajouter dans index.php "include_once 'FPDF/fpdf.php';"
et j'ai crée un nouveau controler et dans l'pdfAction je fais ceci:
quand j'exécute ce code j'obtiens :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 $this->_helper->resetHelpers(); $pdf = new updateFPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(40, 10, 'Hello World !'); $pdf->Output();
%PDF-1.3 3 0 obj <> endobj 4 0 obj <> stream 2 J 0.57 w BT /F1 16.00 Tf ET BT 31.19 794.57 Td (Hello World !) Tj ET endstream endobj 1 0 obj <> endobj 5 0 obj <> endobj 2 0 obj << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] /Font << /F1 5 0 R >> /XObject << >> >> endobj 6 0 obj << /Producer (FPDF 1.6) /CreationDate (D:20110429115137) >> endobj 7 0 obj << /Type /Catalog /Pages 1 0 R /OpenAction [3 0 R /FitH null] /PageLayout /OneColumn >> endobj xref 0 8 0000000000 65535 f 0000000206 00000 n 0000000394 00000 n 0000000009 00000 n 0000000087 00000 n 0000000293 00000 n 0000000498 00000 n 0000000573 00000 n trailer << /Size 8 /Root 7 0 R /Info 6 0 R >> startxref 676 %%EOF
Quelqu'un à déjà réussi à utiliser cette librairie avec ZF.
merci de votre aide.
Partager