Hi,
I`d like to create a big pdf document so I`ve made a simple test
[code]
$s = microtime(true);
$pdf = new Zend_Pdf();
$font = Zend_Pdf_Font::fontWithPath('arial.ttf');
for ($i=0;$i<2000;$i++) {
$page = $pdf->newPage(709,496);
$width = $page->getWidth();
$height = $page->getHeight();
$page->drawLine(0,$height,$width,$height);
$page->drawLine(0,$height,0,0);
$page->setFont($font, 18);
$page->drawText('ąęółśżźćńĄĘÓŁŚŻŹĆŃ'.$i, 40, $height-30,
'UTF-8');
$pages[] = $page;
}
$pdf->pages = $pages;
$pdf->save('test.pdf');
$e = microtime(true);
Zend_Debug::dump('PDF generation took '.round($e-$s,4).' sec.');
[/code]
Simple 2000 pages is generating in more than 6 seconds. When I remove all
require_once I reduce the time with about 1 second.
I`d like to ask you if I`m using this component well? Maybe I could reduce
this time somehow?
All I need is to generate up to 3000 envelopes for print in pdf. maybe I
could somehow define the layout of one page and than clone it 3000 times
filling with appropriate data?
--
View this message in context:
http://www.nabble.com/using-Zend_Pdf-tp19088119p19088119.html
Sent from the Zend Framework mailing list archive at Nabble.com.