• Resolved mgmind

    (@mgmind)


    im getting this error whenever i try and create a PDF invoice or PDF Packing Slip

    Exception: WriteBlob Failed `.png’ @ error/png.c/MagickPNGErrorHandler/1642/data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php (5720)#0 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(5720): Imagick->writeImage(‘.png’) #1 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(5845): Dompdf\Cpdf->addImagePngAlpha(‘file:///data/ap…’, 57.442913385827, 786.54354330709, 150.0, 26.25, 6) #2 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Adapter/CPDF.php(669): Dompdf\Cpdf->addPngFromFile(‘file:///data/ap…’, 57.442913385827, 786.54354330709, 150.0, 26.25) #3 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer/Image.php(65): Dompdf\Adapter\CPDF->image(‘file:///data/ap…’, 57.442913385827, 29.096456692913, 150.0, 26.25, ‘normal’) #4 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(289): Dompdf\Renderer\Image->render(Object(Dompdf\FrameDecorator\Image)) #5 /data/app/public/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 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Image)) #7 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableCell)) #8 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableRow)) #9 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\TableRowGroup)) #10 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(195): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Table)) #11 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Page.php(149): Dompdf\Renderer->render(Object(Dompdf\FrameDecorator\Block)) #12 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(913): Dompdf\FrameReflower\Page->reflow(NULL) #13 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(765): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow() #14 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-pdf-maker.php(54): Dompdf\Dompdf->render() #15 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(846): WPO\WC\PDF_Invoices\PDF_Maker->output() #16 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(911): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf() #17 /data/app/public/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(423): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’) #18 /data/app/public/wp-includes/class-wp-hook.php(308): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax(”) #19 /data/app/public/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #20 /data/app/public/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #21 /data/app/public/wp-admin/admin-ajax.php(188): do_action(‘wp_ajax_generat…’) #22 {main}

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @mgmind,

    Is it possible that your shop logo is in PGN format? If so, could you please try to convert it into a JPEG/JPG file and try again?

    Please note that our PDF engine (dompdf) needs GMagick or IMagick installed on your server to render the PNG images. Also, we are aware of some hosting providers that have custom-builds of these extensions which generates issues sometimes, so using a JPEG image for your shop logo is always safer, that is why we always recommended using a JPEG image when possible.

    Thread Starter mgmind

    (@mgmind)

    thank you, my logo was actually an SVG but i changed it and it seems to be working now.

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Thanks for the clarification, @mgmind:

    The issue with PNG or SVG images seems to be related with the same source: ImageMagick misconfigured. Anyway, I’m happy to hear that it is working now! ??

    Let us know if you need more help ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.