Exception: unable to open image
-
Having an issue with this plugin. Was working fine up to this point. We take web orders on out site and then print out a PDF using this plugin. However today with no rhyme or reason, we are unable to view/print PDF’s due to the following error.
Entire error message:
Exception: unable to open image ‘file:///home/cabctwvugjhd/public_html/wp-content/uploads/2022/07/Medidenta-logo-email-e1657821554605.png’: No such file or directory @ error/blob.c/OpenBlob/3537/home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php (5709)#0 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(5709): Imagick->__construct(‘file:///home/ca…’) #1 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(5845): Dompdf\Cpdf->addImagePngAlpha(‘file:///home/ca…’, 57.442913385827, 677.86417322835, 167.10793246914, 85.03937007874, 6) #2 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Adapter/CPDF.php(669): Dompdf\Cpdf->addPngFromFile(‘file:///home/ca…’, 57.442913385827, 677.86417322835, 167.10793246914, 85.03937007874) #3 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer/Image.php(65): Dompdf\Adapter\CPDF->image(‘file:///home/ca…’, 57.442913385827, 29.096456692913, 167.10793246914, 85.03937007874, ‘normal’) #4 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(289): Dompdf\Renderer\Image->render(Object(Dompdf\FrameDecorator\Image)) #5 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(128): Dompdf\Renderer->_render_frame(‘image’, Object(Dompdf\FrameDecorator\Image)) #6 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Image)) #7 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableCell)) #8 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableRow)) #9 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableRowGroup)) #10 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Table)) #11 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Page.php(149): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Block)) #12 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(913): Dompdf\FrameReflower\Page->reflow(NULL) #13 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(765): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow() #14 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/makers/class-pdf-maker.php(53): Dompdf\Dompdf->render() #15 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(938): WPO\WC\PDF_Invoices\Makers\PDF_Maker->output() #16 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(1004): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf() #17 /home/cabctwvugjhd/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(580): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’) #18 /home/cabctwvugjhd/public_html/wp-includes/class-wp-hook.php(324): WPO\WC\PDF_Invoices\Main->generate_document_ajax(”) #19 /home/cabctwvugjhd/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) #20 /home/cabctwvugjhd/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #21 /home/cabctwvugjhd/public_html/wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_generat…’) #22 {main}
The image file is in the proper location. Nothing has changed since yesterday ??
I re-uploaded the file and properly re-named the image file as well.
I changed the file type from png to jpg to test a file compatability issue.
I have found a TEMPORARY workaround in the advanced settings by outputting the invoices to HTML instead of PDF. The invoices display (with formatting issues) in HTML but print out just fine.
Is there anyone else that has experienced this type of error with this plugin?
Any advice as to how we can get the plugin working normally (printing PDF’s and not displaying the error)? The workaround is a good temporary fix but ultimately we would like to have the plugin working normally like it should.
- The topic ‘Exception: unable to open image’ is closed to new replies.