Title: Fatal Error: Division by Zero
Last modified: February 9, 2022

---

# Fatal Error: Division by Zero

 *  Resolved [ducrodesign](https://wordpress.org/support/users/ducrodesign/)
 * (@ducrodesign)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-division-by-zero/)
 * When trying to open a PDF packing slip, I get the following error:
 * **Fatal error: Division by zero**
 * #0 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/
   dompdf/src/FrameReflower/Table.php(353): Dompdf\FrameReflower\Table->_assign_widths()
   #
   1 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/
   dompdf/src/FrameDecorator/AbstractFrameDecorator.php(887): Dompdf\FrameReflower\
   Table->reflow() #2 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/
   vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php(887): Dompdf\
   FrameReflower\Block->reflow() #4 ../wp-content/plugins/woocommerce-pdf-invoices-
   packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Block.php(865): Dompdf\FrameDecorator\
   AbstractFrameDecorator->reflow() #5 ../wp-content/plugins/woocommerce-pdf-invoices-
   packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.
   php(887): Dompdf\FrameReflower\Block->reflow() #6 ../wp-content/plugins/woocommerce-
   pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameReflower/Block.php(865):
   Dompdf\FrameDecorator\AbstractFrameDecorator->reflow() #7 ../wp-content/plugins/
   woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/FrameDecorator/
   AbstractFrameDecorator.php(887): Dompdf\FrameReflower\Block->reflow() #8 ../wp-
   content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/dompdf/src/
   FrameReflower/Page.php(143): Dompdf\FrameDecorator\AbstractFrameDecorator->reflow()#
   9 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/vendor/dompdf/
   dompdf/src/FrameDecorator/AbstractFrameDecorator.php(887): Dompdf\FrameReflower\
   Page->reflow() #10 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/
   vendor/dompdf/dompdf/src/Dompdf.php(828): Dompdf\FrameDecorator\AbstractFrameDecorator-
   >reflow() #11 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/
   class-wcpdf-pdf-maker.php(54): Dompdf\Dompdf->render() #12 ../wp-content/plugins/
   woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-order-
   document.php(752): WPO\WC\PDF_Invoices\PDF_Maker->output() #13 ../wp-content/
   plugins/woocommerce-pdf-invoices-packing-slips/includes/documents/abstract-wcpdf-
   order-document.php(799): WPO\WC\PDF_Invoices\Documents\Order_Document->get_pdf()#
   14 ../wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-
   wcpdf-main.php(373): WPO\WC\PDF_Invoices\Documents\Order_Document->output_pdf()#
   15 ../wp-includes/class-wp-hook.php(307): WPO\WC\PDF_Invoices\Main->generate_pdf_ajax()#
   16 ../wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #17 ../wp-
   includes/plugin.php(474): WP_Hook->do_action() #18 ../wp-admin/admin-ajax.php(
   187): do_action() #19 {main}
 * Invoices can still be opened. It seems to have something to do with the premium
   templates I have installed.
 * Is it safe to try and roll back to a previous version of the plugin, to see if
   the templates still work there?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-division-by-zero%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-division-by-zero/#post-15344948)
 * I’m so sorry about this. Since you mention it seems to be related to Premium 
   Templates, could you please send us an email at [support@wpovernight.com](https://wordpress.org/support/topic/fatal-error-division-by-zero/support@wpovernight.com?output_format=md)
   including your license key? We’ll then get working on resolving this ASAP!
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-division-by-zero/#post-15344959)
 * > Is it safe to try and roll back to a previous version of the plugin, to see
   > if the templates still work there?
 * Yes, as a temporary solution you can certainly do that, you can download the 
   previous version here on wordpress.org:
    [https://downloads.wordpress.org/plugin/woocommerce-pdf-invoices-packing-slips.2.12.1.zip](https://downloads.wordpress.org/plugin/woocommerce-pdf-invoices-packing-slips.2.12.1.zip)
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-division-by-zero/#post-15345516)
 * This turned out to be a combination of customizer settings (no totals or columns
   for a specific document) and the PHP version (8.0+).
 * We have just released an update for the Premium Templates extension (2.17.0) 
   addressing this issue so that it can be used with the latest version of the free
   plugin. If anyone experiencing this same issue needs help updating to the latest
   version, please send an email to [support@wpovernight.com](https://wordpress.org/support/topic/fatal-error-division-by-zero/support@wpovernight.com?output_format=md)–
   wordpress.org does not allow us to use these forums for supporting our paid extensions.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Fatal Error: Division by Zero’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

## Tags

 * [Division by zero](https://wordpress.org/support/topic-tag/division-by-zero/)
 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)
 * [premium templates](https://wordpress.org/support/topic-tag/premium-templates/)

 * 3 replies
 * 2 participants
 * Last reply from: [Ewout](https://wordpress.org/support/users/pomegranate/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-division-by-zero/#post-15345516)
 * Status: resolved