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

Error trying to print invoices in 1.7
 
milali
Jr. Member
 
Total Posts:  26
Joined:  2012-01-08
 

Hi,

I have upgraded to 1.7 and thought everything was dandy, (I upgraded using the .patch file from 1.6.2 - 1.7.0)

But I went to print an invoice and got this error message when in developer mode

Invalid method Mage_Sales_Model_Order_Pdf_Invoice::insertDocumentNumber(Array
(
    
[0] => Zend_Pdf_Page Object
        
(
            
[_dictionary:protected] => Zend_Pdf_Element_Object Object
                
(
                    
[_value:protected] => Zend_Pdf_Element_Dictionary Object
                        
(
                            
[_items:Zend_Pdf_Element_Dictionary:private] => Array
                                (
                                    
[Type] => Zend_Pdf_Element_Name Object
                                        
(
                                            
[value] => Page
                                            [_parentObject
:Zend_Pdf_Element:private] => 
                                        )

                                    
[LastModified] => Zend_Pdf_Element_String Object
                                        
(
                                            
[value] => D:20120711121509+00'00'
                                            
[_parentObject:Zend_Pdf_Element:private] => 
                                        )

                                    
[Resources] => Zend_Pdf_Element_Dictionary Object
                                        
(
                                            
[_items:Zend_Pdf_Element_Dictionary:private] => Array
                                                (
                                                    
[ProcSet] => Zend_Pdf_Element_Array Object
                                                        
(
                                                            
[items] => ArrayObject Object
                                                                
(
                                                                    
[storage:ArrayObject:private] => Array
                                                                        (
                                                                            
[0] => Zend_Pdf_Element_Name Object
                                                                                
(
                                                                                    
[value] => PDF
                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                )

                                                                            
[1] => Zend_Pdf_Element_Name Object
                                                                                
(
                                                                                    
[value] => Text
                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                )

                                                                        )

                                                                )

                                                            
[_parentObject:Zend_Pdf_Element:private] => 
                                                        )

                                                    
[XObject] => Zend_Pdf_Element_Dictionary Object
                                                        
(
                                                            
[_items:Zend_Pdf_Element_Dictionary:private] => Array
                                                                (
                                                                    
[X1] => Zend_Pdf_Element_Object_Stream Object
                                                                        
(
                                                                            
[_dictionary:Zend_Pdf_Element_Object_Stream:private] => Zend_Pdf_Element_Dictionary Object
                                                                                
(
                                                                                    
[_items:Zend_Pdf_Element_Dictionary:private] => Array
                                                                                        (
                                                                                            
[Length] => Zend_Pdf_Element_Numeric Object
                                                                                                
(
                                                                                                    
[value] => 0
                                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                )

                                                                                            
[Type] => Zend_Pdf_Element_Name Object
                                                                                                
(
                                                                                                    
[value] => XObject
                                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                )

                                                                                            
[Subtype] => Zend_Pdf_Element_Name Object
                                                                                                
(
                                                                                                    
[value] => Image
                                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                )

                                                                                            
[Width] => Zend_Pdf_Element_Numeric Object
                                                                                                
(
                                                                                                    
[value] => 200
                                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                )

                                                                                            
[Height] => Zend_Pdf_Element_Numeric Object
                                                                                                
(
                                                                                                    
[value] => 50
                                                                                                    [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                )

                                                                                            
[ColorSpace] => Zend_Pdf_Element_Array Object
                                                                                                
(
                                                                                                    
[items] => ArrayObject Object
                                                                                                        
(
                                                                                                            
[storage:ArrayObject:private] => Array
                                                                                                                (
                                                                                                                    
[0] => Zend_Pdf_Element_Name Object
                                                                                                                        
(
                                                                                                                            
[value] => Indexed
                                                                                                                            [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                                        )

                                                                                                                    
[1] => Zend_Pdf_Element_Name Object
                                                                                                                        
(
                                                                                                                            
[value] => DeviceRGB
                                                                                                                            [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                                        )

                                                                                                                    
[2] => Zend_Pdf_Element_Numeric Object
                                                                                                                        
(
                                                                                                                            
[value] => 255
                                                                                                                            [_parentObject
:Zend_Pdf_Element:private] => 
                                                                                                                        )

                                                                                                                    
[3] => Zend_Pdf_Element_Object Object
                                                                                                                        
(
                                                                                                                            
[_value:protected] => Zend_Pdf_Element_String_Binary Object
                                                                                                                                
(
                                                                                                                                    
[value] => Ã¿Ã¨Âª"""333ÿòÍÿé­ÿÜ}ÿïÄïïïÿâ•ÿüö±±±,,,ÿëµvhBUUTfffÿÈ4ÈÈÈÿÒXÿÕdÿàÿüòÿðÇÿÆ.ÿ椬4ÅÅÅÿ캽½½ÿÚuýË*ÿÛDÿÊ9ûûû˜˜˜ÂÂÂãããÿúí•••ÿúìÿþûÿýøçççÿôØÿûðöÏ<

#0 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Sales\Model\Order\Pdf\Invoice.php(136): Varien_Object->__call('insertDocumentN...', Array)
#1 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Sales\Model\Order\Pdf\Invoice.php(136): Mage_Sales_Model_Order_Pdf_Invoice->insertDocumentNumber(Object(Zend_Pdf_Page), 'Invoice # 10000...')
#2 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Adminhtml\Controller\Sales\Invoice.php(119): Mage_Sales_Model_Order_Pdf_Invoice->getPdf(Array)
#3 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Adminhtml\controllers\Sales\Order\InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction()
#4 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Core\Controller\Varien\Action.php(419): Mage_Adminhtml_Sales_Order_InvoiceController->printAction()
#5 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Core\Controller\Varien\Router\Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#6 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Core\Controller\Varien\Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#7 H:\www\docs\mamaminx.com.au\app\code\core\Mage\Core\Model\App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#8 H:\www\docs\mamaminx.com.au\app\Mage.php(683): Mage_Core_Model_App->run(Array)
#9 H:\www\docs\mamaminx.com.au\index.php(87): Mage::run('mamaminx', 'website')
#10 {main}

I am super open to advice as this is the same error I’ll get if I run it on the live server too!

In the code its executing this exception when trying to run

Invoice.php

public function getPdf($invoices = array())
...
            
$this->insertDocumentNumber(
                
$page,
                
Mage::helper('sales')->__('Invoice # ') . $invoice->getIncrementId()
...
 
Magento Community Magento Community
Magento Community
Magento Community
 
milali
Jr. Member
 
Total Posts:  26
Joined:  2012-01-08
 

/bump?

PDF generation stuff is a mystical thing to me :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
leommb
Jr. Member
 
Total Posts:  4
Joined:  2011-12-31
 

Hi guys,

recently shifted to magento 1.7 ce and having problem with printing invoices. When i click on print it returns 503 error

503 Service Unavailable

The server is temporarily busy, try again later!
Powered By LiteSpeed Web Server
LiteSpeed Technologies is not responsible for administration and contents of this web site!

tried to search web but not found anything can some one help me

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
milali
Jr. Member
 
Total Posts:  26
Joined:  2012-01-08
 

switch to developer mode and see if you get that same error?

 
Magento Community Magento Community
Magento Community
Magento Community
 
bannostookaylo
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2013-04-04
 

Any resolution to this error? I just started getting it…

 
Magento Community Magento Community
Magento Community
Magento Community
 
bannostookaylo
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2013-04-04
 

The resolution to my error was that someone last year had made a customization of the Mage/Sales/Model/Order/Pdf/Abstract.php file in the local directory. But then when we upgraded the system that old file was still overriding the new file. Once I narrowed it down to that I updated the custom Abstract.php to reflect the new version in 1.7.0.2 and now everything works like a charm.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ajnet
Jr. Member
 
Total Posts:  1
Joined:  2013-04-02
 

The problem can also appear when somebody edit file Mage/Sales/Model/Order/Pdf/Invoice.php

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sal_C
Jr. Member
 
Total Posts:  9
Joined:  2013-11-15
 

I had the same problem. This solved my problem,

http://magento.stackexchange.com/questions/9721/error-while-printing-invoice

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