View Single Post
  #1 (permalink)  
Old 01-30-2008, 03:46 PM
tuurtnt tuurtnt is offline
Junior Member
 
Join Date: Jan 2008
Posts: 1
Default zend_pdf template new page

Hi everybody,

i am using the latest zend framework. I am creating a pdf-generator. I have a database and i want to print that information in a pdf.

Now my problem. I don't know how to create a new page in the document (i have searched google and the tutorials but I can't find anything for my problem, so hopefully you can help me out...

here is the script i am using! ( i skipped the output/render stuff, this works)

PHP Code:
// LOAD ZEND_PDF 
require_once $_SERVER["DOCUMENT_ROOT"].'/system/Zend/Pdf.php'

$fileName $_SERVER["DOCUMENT_ROOT"].'/test.pdf'

if( 
file_exists$fileName ) ){ 
    
$pdf Zend_Pdf::load$fileName ); 


// Assign the style 
$page $pdf->pages[0]; 

$font Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA); 
$page->setFont($font9); 
$page->setLineWidth(0); 

foreach( 
$db_array as $k => $v ){ 
$page->drawText$v,500,600); 

//NEW PAGE 
$pdf->newPage(Zend_Pdf_Page::SIZE_A4);  //(THIS ISN'T WORKING) 

thanx!
Reply With Quote