• HI there,

    the plugin is no longer works as it shows “Exception: Unable to create new image” at the pdf invoice page every time when I try to create an invoice.

    the error page:
    ========================================================
    Exception: Unable to create new image
    #0 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(4883): Imagick->newimage()
    #1 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/lib/Cpdf.php(4984): Cpdf->addImagePngAlpha()
    #2 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Adapter/CPDF.php(864): Cpdf->addPngFromFile()
    #3 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer/Image.php(110): Dompdf\Adapter\CPDF->image()
    #4 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(293): Dompdf\Renderer\Image->render()
    #5 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(127): Dompdf\Renderer->_render_frame()
    #6 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\Renderer->render()
    #7 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\Renderer->render()
    #8 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\Renderer->render()
    #9 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\Renderer->render()
    #10 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Renderer.php(194): Dompdf\Renderer->render()
    #11 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Page.php(148): Dompdf\Renderer->render()
    #12 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\FrameReflower\Page->reflow()
    #13 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(847): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #14 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-pdf-maker.php(53): Dompdf\Dompdf->render()
    #15 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(627): WPO\WC\PDF_Invoices\PDF_Maker->output()
    #16 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(662): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()
    #17 {……}/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(337): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf()
    #18 {……}/wp-includes/class-wp-hook.php(288): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax()
    #19 {……}/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters()
    #20 {……}/wp-includes/plugin.php(478): WP_Hook->do_action()
    #21 {……}/wp-admin/admin-ajax.php(175): do_action()
    #22 {main}
    ===============================================

    I replace {……} with the actual link for security purpose

    please advise thanks!

Viewing 2 replies - 16 through 17 (of 17 total)
  • Thread Starter travelavenger

    (@travelavenger)

    owner: www-data
    group: www-data

    I just tried another invoice plugin and it works with the my current php 7.4.3.

    But the feature of your plugin has a lot more, and if you could confirm the latest version works with php 7.4.3 maybe that is a compatibility issue.

    Plugin Contributor Ewout

    (@pomegranate)

    plugin is fully compatible with PHP7.4, we have no other reports of this issue, so I’m afraid there’s nothing else we can do for you here. What you could do as an alternative approach is to install the mpdf addon: https://github.com/wpovernight/woocommerce-pdf-ips-mpdf/releases
    This replaces dompdf with another pdf library and may fix this issue for you too.

Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘Exception: Unable to create new image’ is closed to new replies.