pdf模板在ZEND框架中编辑和保存

时间:2014-04-22 11:56:48

标签: php zend-framework pdf zend-pdf

我创建了pdf模板并按如下所示加载

$fileName = ROOT .'/public/pdf/i23.pdf';

$image2 =  ROOT .'/public/images/kloo.jpg';

$pdf =  Zend_Pdf::load($fileName);  

$page = $pdf->newPage(Zend_Pdf_Page::SIZE_A4); 
$pdf->pages[] = $page; 

$font = Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA);
$page->setFont($font, 12);

$imageTopLeft = 100;
$imageTop = 100;
$imageBottomRight = 100;
$imageBottom = 500;
$image = Zend_Pdf_Image::imageWithPath($image2);

$page->drawText("Hello world...", 10, 10);

// save the document
$pdf->save('ggg.pdf');

我需要在pdf中加载图像位置并保存

0 个答案:

没有答案