Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

custom special pdf tax invoices through admin working locally but not on host server, please help, it’s weird. 
 
youngilaboungi
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2008-11-27
Alexandria, Egypt
 

Hello there,

ok, so first you might think im talkin about customizing the pdf invoice...well no, I already customized the pdf invoice itself, im actually talking about adding another “PRINT PDF TAX INVOICE” in the admin drop down in both ORDERS and INVOICES pages but I get a white blank page and the following error in the error log:

PHP Fatal error: Class 'Zend_Pdf_Color_RGB' not found in /***/***/***/***/html/app/code/local/Mage/Sales/Model/Order/Pdf/Taxinvoice.php on line 191refererhttp://***/admin/sales_invoice/index/filter/Y3JlYXRlZF9hdCU1QmZyb20lNUQ9MDMlMkYxJTJGMDkmY3JlYXRlZF9hdCU1QnRvJTVEPTAzJTJGMzElMkYwOSZjcmVhdGVkX2F0JTVCbG9jYWxlJTVEPWVuX1VTJm9yZGVyX2NyZWF0ZWRfYXQlNUJsb2NhbGUlNUQ9ZW5fVVM=/internal_invoice_ids//form_key/bzoqN4apigzEf6IS/

The thing is I managed to get what I want working locally, I customized my special pdf templates and controllers and actually everything’s working locally. and now in order to print my custom invoices I have to download the database from the server to local.

I even redone all my work flow building another custom pdf invoice and controller locally and performing same exact changes and new files to the host server and I ended up with it working locally only.

So I redownloaded the whole site off the host server and checked again, this same exact whole site IS ACTUALLY working locally with the pdf thing.

I cant understand what does this Zend RGB thing have to do with the error especially that it’s working locally like a charm.
also, line 191 does not have anything that has to do with “Zend_Pdf_Color_RGB”

So I came to think it’s kind of a permissions problem...can it be? the default magento invoice print is working well on both local and host server.

Any help is appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
idoia
Jr. Member
 
Total Posts:  17
Joined:  2009-08-30
Barcelona
 

I have exactlly the same problem.

did you find any solution??

 
Magento Community Magento Community
Magento Community
Magento Community
 
idoia
Jr. Member
 
Total Posts:  17
Joined:  2009-08-30
Barcelona
 

I found the solution.

I had to add the zend_color_rgb library under /local/Zend/Pdf/Color/rgb.php and add the next line in the document where the zend_pdf is created:

require_once ‘Zend/Pdf/Color/Rgb.php’;

Regards!! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
youngilaboungi
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2008-11-27
Alexandria, Egypt
 

im glad you got it working, but honestly I dont understand.
I copied Rgb.php file from /lib/Zend/Pdf/Color/Rgb.php to a new structure in /app/code/local/Zend/Pdf/Color/Rgb.php is that correct?
then in my Taxinvoice.php which causes this error, right before the Class statement I entered :

require_once 'Zend/Pdf/Color/Rgb.php' ;
and that doesnt solve the problem, I think im not getting it right, pls elaborate clearly…
I’m really thankful you are sharing your solution.
 
Magento Community Magento Community
Magento Community
Magento Community
 
youngilaboungi
Jr. Member
 
Avatar
Total Posts:  28
Joined:  2008-11-27
Alexandria, Egypt
 

Hey, nevermind of my post, seems YOUR QUOTATION “ ‘ “ that I copied from your post is different character or something, coz I retyped the code again in Taxinvoice.php and got it working....thanks bro alot, you saved me time, effort and headache.

Anyone can copy past my code and not yours coz your single quotation in the require_once are different… (I faced this problem in other modules and people sharing codes for it too, I think wordpress module)

smile thank you again

 
Magento Community Magento Community
Magento Community
Magento Community
 
osman koca
Jr. Member
 
Total Posts:  2
Joined:  2009-03-01
 

gute Frage
Danke.
http://www.bulduktransumzug.at/

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top