Magento 2 - Only non-interlaced images are currently supported issue
This is a pretty common issue when you use png images throughout your site, because of which you also use the png image for logo of PDFs in Magento 2.
The stack trace might look something like this:
1 exception(s):
Exception #0 (Zend_Pdf_Exception): Only non-interlaced images are currently supported.
Exception #0 (Zend_Pdf_Exception): Only non-interlaced images are currently supported.
<pre>#1 Zend_Pdf_Resource_ImageFactory::factory() called at [vendor/magento/zendframework1/library/Zend/Pdf/Image.php:124]
#2 Zend_Pdf_Image::imageWithPath() called at [vendor/magento/module-sales/Model/Order/Pdf/AbstractPdf.php:247]
#3 Magento\Sales\Model\Order\Pdf\AbstractPdf->insertLogo() called at [vendor/magento/module-sales/Model/Order/Pdf/Invoice.php:136]
#4 Magento\Sales\Model\Order\Pdf\Invoice->getPdf() called at [vendor/magento/module-sales/Controller/Adminhtml/Invoice/AbstractInvoice/PrintAction.php:58]
#5 Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice\PrintAction->execute() called at [generated/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/PrintAction/Interceptor.php:24]
#6 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#7 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#8 Magento\Backend\App\AbstractAction->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#9 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#10 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#11 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#12 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->___callPlugins() called at [generated/code/Magento/Sales/Controller/Adminhtml/Order/Invoice/PrintAction/Interceptor.php:39]
#14 Magento\Sales\Controller\Adminhtml\Order\Invoice\PrintAction\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#15 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#16 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#17 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#18 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Infortis/Cgen/Plugin/Magento/Framework/App/FrontController.php:32]
#19 Infortis\Cgen\Plugin\Magento\Framework\App\FrontController->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#20 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#21 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#22 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:136]
#23 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#24 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#25 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
</pre>
While the issue might seem something big, the solution is pretty simple for Magento. All you have to do is switch from using PNG to JPEG.
In Magento 2, if the issue is triggered during pdf
print out. Go to Stores > Configuration > Sales > Sales > Invoice and Packaging Slip Design > Logo for PDF Print-outs (200x50)
and upload the JPEG version of the image and save it.
Same goes for Magento 1, but the path is Go to System > Configuration > Sales > Sales > Invoice and Packaging Slip Design > Logo for PDF Print-outs (200x50)
.