Author: Not specified Language: php
Description: Ejemplo PDF con Zend_PDF (v2) Timestamp: 2013-05-21 13:03:19 +0000
View raw paste Parent paste by: Leandro Tec Can Reply
  1.         /**
  2.          * By Leandro :D
  3.          */
  4.         $pdf = new Zend_Pdf();
  5.         $pdf = Zend_Pdf::load("template.pdf");
  6.  
  7.         $pdf->pages[] = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_LETTER);
  8.         $page=$pdf->pages[0];
  9.         $style = new Zend_Pdf_Style();
  10.         $style->setLineColor(new Zend_Pdf_Color_Rgb(0,0,0));
  11.  
  12.         $font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_TIMES);
  13.  
  14.         $style->setFont($font,12);
  15.  
  16.         $page->setStyle($style);
  17.         $page->drawText("example text here",100,($page->getHeight()-100));
  18.  
  19.  
  20.         echo "<pre>";
  21.         header("content-type: application/pdf");
  22.         print($pdf->render());
  23.         exit();
View raw paste Parent paste by: Leandro Tec Can Reply