Title: Error when generating PDF
Last modified: August 30, 2016

---

# Error when generating PDF

 *  Resolved [battra](https://wordpress.org/support/users/battra/)
 * (@battra)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/)
 * First of all, thanks for the great plugin! I just installed it and I’m having
   a problem generating the PDF.
 * It gives me error 500 and with debug enabled, this is the error that I get:
    —-
   Fatal error: Unsupported operand types in /home/username/public_html/wp-content/
   plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/include/font_metrics.
   cls.php on line 262 —-
 * With ‘Output to HTML’ checkbox ticked, I can see the HTML invoice is indeed created.
   Temporary folders ‘/wp-content/uploads/wpo_wcpdf/fonts’ (and also ‘attachments’
   and ‘dompdf’) are there with permission 755. The ‘fonts’ folder seems to have
   all the files there.
 * On the ‘Status’ tab, only ‘opcache’ is highlighted in yellow/orange.
 * Any idea what’s wrong?
 * [https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)

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

 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823642)
 * Hi! I think this is related to the font files (looks like you suspected this 
   already). How did you install the plugin? Have you tried installing it via Plugins
   > Add New > then search for “WooCommerce PDF Invoices & Packing Slips”?
 * Let me know if that helps!
 *  Thread Starter [battra](https://wordpress.org/support/users/battra/)
 * (@battra)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823649)
 * Yesterday I couldn’t install it through the admin panel (can’t remember the error)
   so I uploaded the zip file manually. I couldn’t update WooCommerce too yesterday
   although updating WC works now.
 * If I re-install the plugin through Dashboard, will I lose my settings?
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823651)
 * Hi! No, settings will be kept in the database. I do recommend deleting the /wp-
   content/uploads/wpo_wcpdf/ folder too, to make sure the font install is triggered.
 * The fact that you couldn’t install the plugin via the dashboard may indicate 
   that there’s something wrong with permissions.
 * Let me know what you find!
 * Ewout
 *  Thread Starter [battra](https://wordpress.org/support/users/battra/)
 * (@battra)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823657)
 * That does the trick! Thank you for your help, Ewout!
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823662)
 * Ah the myserious ways of WordPress 🙂
 * If you can spare a minute, I’d really appreciate [a review](https://wordpress.org/support/view/plugin-reviews/woocommerce-pdf-invoices-packing-slips#postform).
 * Let me know if you have any other questions and have a fantastic day!
    Ewout
 *  Thread Starter [battra](https://wordpress.org/support/users/battra/)
 * (@battra)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823701)
 * Will do, Ewout 🙂 Thanks again!
 *  Plugin Contributor [Ewout](https://wordpress.org/support/users/pomegranate/)
 * (@pomegranate)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823739)
 * Thanks, awesome review 🙂
 * have a great day!
    Ewout
 *  [Alvaro Gómez](https://wordpress.org/support/users/mrfoxtalbot/)
 * (@mrfoxtalbot)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823837)
 * This trick worked for me too, thankyou!

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

The topic ‘Error when generating PDF’ 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/)

 * 8 replies
 * 3 participants
 * Last reply from: [Alvaro Gómez](https://wordpress.org/support/users/mrfoxtalbot/)
 * Last activity: [10 years, 5 months ago](https://wordpress.org/support/topic/error-when-generating-pdf-1/#post-6823837)
 * Status: resolved