0

I'm facing an error when I try to print new order invoice, error details are given below,

There has been an error processing your request

Image is not a PNG:

Trace:
#0 /home/.../public_html/lib/Zend/Pdf/Resource/ImageFactory.php(54): Zend_Pdf_Resource_Image_Png->__construct('/home/orangesna...')
#1 /home/.../public_html/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('/home/orangesna...')
#2 /home/.../public_html/app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php(158): Zend_Pdf_Image::imageWithPath('/home/orangesna...')
#3 /home/.../public_html/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php(123): Mage_Sales_Model_Order_Pdf_Abstract->insertLogo(Object(Zend_Pdf_Page), Object(Mage_Core_Model_Store))
#4 /home/.../public_html/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php(119): Mage_Sales_Model_Order_Pdf_Invoice->getPdf(Array)
#5 /home/.../public_html/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php(489): Mage_Adminhtml_Controller_Sales_Invoice->printAction()
#6 /home/.../public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Adminhtml_Sales_Order_InvoiceController->printAction()
#7 /home/.../public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('print')
#8 /home/.../public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#9 /home/.../public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#10 /home/.../public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#11 /home/.../public_html/index.php(87): Mage::run('', 'store')
#12 {main}

Error log record number: 887679800526

1 Answer 1

1

Image is not a PNG

Logo for PDF Print-outs was uploaded with "png" file extension, but actual type differs. So image factory tries to handle it as png, but fails. Reupload of the new image with correct format will fix this issue.

1
  • My issue is, image name is with .png extension but the logo file is not in PNG format.
    – Sumit
    Commented Apr 12, 2022 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.