Support » Plugin: WooCommerce PDF Invoices & Packing Slips » Fatal Eror when creating a PDF

  • Resolved djohalloran

    (@djohalloran)


    Hi – I’ve started getting this error when generating a PDF. Any pointers would be appreciated.

    Fatal error: Unsupported operand types: string + float
    #0 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(903): Dompdf\FrameReflower\AbstractFrameReflower->get_min_max_width()
    #1 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Cellmap.php(645): Dompdf\FrameDecorator\AbstractFrameDecorator->get_min_max_width()
    #2 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Cellmap.php(518): Dompdf\Cellmap->add_frame(Object(Dompdf\FrameDecorator\TableCell))
    #3 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Cellmap.php(518): Dompdf\Cellmap->add_frame(Object(Dompdf\FrameDecorator\TableRow))
    #4 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Cellmap.php(518): Dompdf\Cellmap->add_frame(Object(Dompdf\FrameDecorator\TableRowGroup))
    #5 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Table.php(532): Dompdf\Cellmap->add_frame(Object(Dompdf\FrameDecorator\Table))
    #6 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Table.php(408): Dompdf\FrameReflower\Table->get_min_max_width()
    #7 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\FrameReflower\Table->reflow(Object(Dompdf\FrameDecorator\Block))
    #8 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Block.php(845): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow(Object(Dompdf\FrameDecorator\Block))
    #9 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\FrameReflower\Block->reflow(NULL)
    #10 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Page.php(141): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #11 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(895): Dompdf\FrameReflower\Page->reflow(NULL)
    #12 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/Dompdf.php(847): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()
    #13 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-pdf-maker.php(53): Dompdf\Dompdf->render()
    #14 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(712): WPO\WC\PDF_Invoices\PDF_Maker->output()
    #15 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-document.php(747): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()
    #16 /home/bluethem/public_html/mdlockandkey.ie/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-main.php(358): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf(‘inline’)
    #17 /home/bluethem/public_html/mdlockandkey.ie/wp-includes/class-wp-hook.php(287): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax(”)
    #18 /home/bluethem/public_html/mdlockandkey.ie/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(”, Array)
    #19 /home/bluethem/public_html/mdlockandkey.ie/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #20 /home/bluethem/public_html/mdlockandkey.ie/wp-admin/admin-ajax.php(184): do_action(‘wp_ajax_generat…’)
    #21 {main}

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

    (@yordansoares)

    Hello @djohalloran,

    I suspect that you are using PHP 8.0, is that correct? The PDF library that we use is not compatible with PHP 8.0 yet, this will hopefully be released somewhere in the next few weeks.

    Generally speaking I would recommend sticking with PHP7.4 for a couple of months until all systems are compatible – as you can see we too are tied to third party libraries that need to be updated.

    Let me know if you solve this issue!

    Thread Starter djohalloran

    (@djohalloran)

    This was precisely the problem. Thank you so much.

    Plugin Support Yordan Soares

    (@yordansoares)

    Glad to know you solve the issue!

    If you need more help let us know.

    Have a nice day.

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