jitu_coder Posted July 21, 2009 Share Posted July 21, 2009 First of all its just two days since i started zend and i am on a learning curve so please ignore any silly mistakes i might have made and help me out here guys. i have an image i want to import into a PDF that have some text. I want to append it to the text and display on web page. Can anyone please tell me what i am doing wrong here ? PDF generated is corrupt. This is my code here : $pdf = new Zend_Pdf(); $page = $pdf->newPage('510:745:'); // insert picture $image_name = "test.png"; $image = Zend_Pdf_Image::imageWithPath($image_name); $page->drawImage($image, 200, 200, 0, 0); $pdf->pages[] = $page; $pdfData = $pdf->render(); header("Content-Disposition: inline; filename=result.pdf"); header("Content-type: application/x-pdf"); echo $pdfData; Link to comment https://forums.phpfreaks.com/topic/166813-importing-image-in-pdf-using-zend-framework/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.