Title: Error in Generating PDF
Last modified: October 21, 2023

---

# Error in Generating PDF

 *  Resolved [wastedolphine](https://wordpress.org/support/users/wastedolphine/)
 * (@wastedolphine)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-generating-pdf/)
 * Hi,
 * I am getting the following error when clicking on Packing Slip button from the
   order details page
 *     ```wp-block-code
       Error detected. PDF file generation aborted: foreach() argument must be of type array|object, bool given
       ```
   
 * Also the following erros are recorded in error-log file
 *     ```wp-block-code
       fopen(/home/####/public_html/wp-content/uploads/WOO-INVOICE/Invoice/23-24/137.pdf): Failed to open stream: No such file or directory in /home/####/public_html/wp-content/uploads/WOO-INVOICE/mpdf-pro/vendor/mpdf/mpdf/src/Mpdf.php on line 9606
       ```
   
 * Because of this new order notifications are not geeting sent, Any solution for
   this?
 * Thanks.

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

 *  Plugin Support [Ahmed Imran](https://wordpress.org/support/users/ahmedimran/)
 * (@ahmedimran)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-generating-pdf/#post-17142667)
 * Hello [@wastedolphine](https://wordpress.org/support/users/wastedolphine/),
 * Thanks for reaching out to us and sorry for the inconvenience.
 * To address this issue, please follow these steps and let us know if the problem
   persists:
    1. Ensure that the /wp-content/uploads/WOO-INVOICE directory has read-write permissions.
    2. Check that the zip extension is enabled and that your PHP configuration has 
       zip extract permissions. You may need to contact your server administrator to
       configure this.
 * If the issue persists, follow these additional steps:
    1. Deactivate and delete the Challan plugin.
    2. Reinstall and activate the Challan plugin.
    3. Go to your WP-Admin dashboard and navigate to the Challan page. Verify if everything
       is set up correctly.
 * Should the problem continue, please let us know.
 * We appreciate your cooperation in resolving this matter.
    -  This reply was modified 2 years, 7 months ago by [Ahmed Imran](https://wordpress.org/support/users/ahmedimran/).
 *  Thread Starter [wastedolphine](https://wordpress.org/support/users/wastedolphine/)
 * (@wastedolphine)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-generating-pdf/#post-17168709)
 * Hi,
 * Thanks for the support, however, I am still getting this error, I did what you
   mentioned but on a new order still the email was not delivered.
 * I got the following error-log file:
 *     ```wp-block-code
       PHP Warning:  Cannot modify header information - headers already sent in /home/#####/public_html/wp-content/plugins/challan-pro/includes/rest-api/font-downloader-api.php on line 196
       ```
   
 * Thanks.
 *  Thread Starter [wastedolphine](https://wordpress.org/support/users/wastedolphine/)
 * (@wastedolphine)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-generating-pdf/#post-17174232)
 * Hi,
 * Any update on this, new orders emails are not being sent because of this.

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

The topic ‘Error in Generating PDF’ is closed to new replies.

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

## Tags

 * [pdf](https://wordpress.org/support/topic-tag/pdf/)

 * 3 replies
 * 2 participants
 * Last reply from: [wastedolphine](https://wordpress.org/support/users/wastedolphine/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/error-in-generating-pdf/#post-17174232)
 * Status: resolved