Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-30-2008, 03:46 PM
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-15-2008, 12:23 PM
Junior Member
 
Join Date: Mar 2008
Posts: 7
Default

You probably found the sollution by now but anyway the code should be
Code:
//$pdf->newPage(Zend_Pdf_Page::SIZE_A4);  //(THIS ISN'T WORKING)  
$pdf->pages[] = $pdf->newPage(Zend_Pdf_Page::SIZE_A4);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:12 AM.