Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating PDF with Zend Framework

I am using Zend Framework and inherited classes i.e. My_Pdf (that i got from sourceforge and My_Pdf library is used to draw tables)to create PDF file from database. When I create PDF file without table outlines it is working well and generating PDF. But when i try to draw table corresponding to data, I got an error,

Fatal error: Declaration of My_Pdf_Page::drawImage() must be compatible with that of  Zend_Pdf_Canvas_Interface::drawImage() in C:\Users\TranceServe\Zend\workspaces\DefaultWorkspace7\Crushed_PLanet\library\My\Pdf\Page.php on line 369

Please guide me what to do.

like image 335
Amritpal singh Avatar asked Mar 06 '26 01:03

Amritpal singh


1 Answers

This means that the blueprint of a deriving class is not identical to a class higher up in the inheritance hiearchy.

And this most probably means that the PDF library has not been updated to work with the latest Zend Framework version.

You are using Zend Framework version 1.11.3 BUT...

Very obviously the library you are trying to use was written for Zend Framework 1.8 (first box), it has not been updated since May 2009 (second box) and therefore nobody downloads it anymore these days (third box).

Lesson: Know your tools!

like image 51
markus Avatar answered Mar 08 '26 09:03

markus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!