Support » Plugin: WooCommerce PDF Invoices » Cannot generate PDF

  • Resolved wpuser543

    (@wpuser543)


    The plugin fails to generate PDF invoices. These are errors in the PHP error log on the server:

    [12-Jul-2017 23:39:11 UTC] PHP Warning:  fopen(): Filename cannot be empty in /public_html/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php on line 9440
    [12-Jul-2017 23:39:11 UTC] PHP Fatal error:  Uncaught exception 'MpdfException' with message 'Unable to create output file: ' in /public_html/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php:9442
    Stack trace:
    #0 /public_html/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(204): mPDF->Output(false, 'F')
    #1 /public_html/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-invoice.php(339): BEWPI_Abstract_Document->generate('F')
    #2 /public_html/wp-content/plugins/woocommerce-pdf-invoices/includes/woocommerce-pdf-invoices.php(332): BEWPI_Abstract_Invoice->update()
    #3 [internal function]: BE_WooCommerce_PDF_Invoices->admin_pdf_callback('')
    #4 /public_html/wp-includes/plugin.php(524): call_user_func_array(Array, Array)
    #5 /public_html/wp-admin/admin.php(154): do_action('admin_init')
    #6 /public_html/wp-admin/post.php(12): require_once('/hom in /public_html/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php on line 9442

    WP system report:

    
    ### WordPress Environment ###
    
    WC Version: 2.6.8
    Log Directory Writable: ✔
    WP Version: 4.6.1
    WP Multisite: –
    WP Memory Limit: 428 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: en_AU
    
    ### Server Environment ###
    
    Server Info: nginx/1.9.15
    PHP Version: 5.6.11-1ubuntu3.3
    PHP Post Max Size: 20 MB
    PHP Time Limit: 1040
    PHP Max Input Vars: 5000
    cURL Version: 7.43.0
    OpenSSL/1.0.2d
    
    SUHOSIN Installed: –
    MySQL Version: 5.6.30
    Max Upload Size: 20 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    WCS_DEBUG: ✔ No
    Subscriptions Mode: ✔ Live
    
    ### Database ###
    
    WC Database Version: 2.6.8
    : 
    woocommerce_sessions: ✔
    woocommerce_api_keys: ✔
    woocommerce_attribute_taxonomies: ✔
    woocommerce_downloadable_product_permissions: ✔
    woocommerce_order_items: ✔
    woocommerce_order_itemmeta: ✔
    woocommerce_tax_rates: ✔
    woocommerce_tax_rate_locations: ✔
    woocommerce_shipping_zones: ✔
    woocommerce_shipping_zone_locations: ✔
    woocommerce_shipping_zone_methods: ✔
    woocommerce_payment_tokens: ✔
    woocommerce_payment_tokenmeta: ✔
    MaxMind GeoIP Database: ✔
    
    ### Active Plugins (28) ###
    
    Admin Management Xtended: by Oliver Schlöbe – 2.4.1
    Advanced Custom Fields: by Elliot Condon – 4.4.11
    Contact Form 7: by Takayuki Miyoshi – 4.6.1
    Enable Media Replace: by Måns Jonasson – 3.0.6
    Formidable Forms: by Strategy11 – 2.03.03
    Groups WooCommerce: by itthinx – 1.9.6
    Groups: by itthinx – 1.13.1
    Salient Visual Composer: by Michael M - WPBakery.com | Modified by ThemeNectar – 4.12
    Min and Max Quantity for WooCommerce: by BeRocket – 1.0.2
    Open External Links In New Windows: by Keef – 1.0.0
    CF Page or Post Duplicator: by Carlos Fazenda – 0.1
    WC-AC Hook: by Matthew Treherne – 1.2.2
    WC Password Strength Settings: by Daniel Santoro – 1.0.0
    Woocommerce Group Pricing: by eggemplo – 3.0
    Advanced Order Export For WooCommerce: by AlgolPlus – 1.2.6
    WooCommerce Checkout Field Editor Pro: by ThemeHiGH – 2.5.3
    WooCommerce Customizer: by SkyVerge – 2.3.1
    WooCommerce Direct Checkout: by Terry Tsang – 1.1.2
    WooCommerce Stripe Gateway: by Automattic – 3.0.6
    WooCommerce PDF Invoices: by Bas Elbers – 2.9.3
    WooCommerce Smart Coupons: by WooThemes – 3.1.2 – 3.3.4 is available
    WooCommerce Social Media Share Buttons: by Toastie Studio – 1.3.0
    WooCommerce Subscriptions: by Prospress Inc. – 2.0.19 – 2.2.8 is available
    WooCommerce: by WooThemes – 2.6.8
    WordPress Importer: by wordpressdotorg – 0.6.3
    WP AJAX Login and Register: by Leo – 1.3
    
    ### Settings ###
    
    Force SSL: ✔
    Currency: AUD ($)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 0
    
    ### API ###
    
    API Enabled: ✔
    
    ### WC Pages ###
    
    Shop Base: #5 - /shop/
    Basket: #6 - /cart/
    Checkout: #7 - /checkout/
    My Account: #8 - /my-account/
    
    ### Taxonomies ###
    
    Product Types: external (external)
    grouped (grouped)
    simple (simple)
    subscription (subscription)
    variable (variable)
    variable subscription (variable-subscription)
    
    ### Theme ###
    
    Name: Salient
    
    ### Templates ###
    
    Overrides: Your theme has a woocommerce.php file
    you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues.
    
    Overrides: salient/woocommerce/cart/cart-shipping.php
    salient/woocommerce/cart/cart-totals.php
    salient/woocommerce/cart/cart.php
    salient/woocommerce/cart/shipping-calculator.php
    salient/woocommerce/checkout/form-checkout.php
    salient/woocommerce/checkout/form-shipping.php
    salient/woocommerce/checkout/review-order.php
    salient/woocommerce/content-product.php
    salient/woocommerce/content-single-product.php
    salient/woocommerce/loop/add-to-cart.php
    salient/woocommerce/myaccount/form-login.php
    salient/woocommerce/single-product/product-image.php
    salient/woocommerce/single-product/tabs/description.php
    salient/woocommerce/single-product/tabs/tabs.php
    
    
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    Some filter is causing this error. Are you using ‘bewpi_allowed_roles_to_download_invoice’ or ‘bewpi_admin_pdf_callback_end’? Can you comment them out? What happens if you deactivate all other plugins?

    Plugin Author Bas Elbers

    (@baaaaas)

    Will close topic due to inactivity. Let me know if you have any questions.

    wube

    (@wujek_bogdan)

    I’m having the same problem.

    
    [02-Jan-2018 12:35:46 UTC] PHP Fatal error:  Uncaught MpdfException: Unable to create output file: /var/www/clients/client2/web71/web/wp-content/uploads/woocommerce-pdf-invoices/attachments/2018/2018-01-00010.pdf in /var/www/clients/client2/web71/web/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php:9442
    Stack trace:
    #0 /var/www/clients/client2/web71/web/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(204): mPDF->Output('/var/www/client...', 'F')
    #1 /var/www/clients/client2/web71/web/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-invoice.php(321): BEWPI_Abstract_Document->generate('F')
    #2 /var/www/clients/client2/web71/web/wp-content/plugins/woocommerce-pdf-invoices/includes/woocommerce-pdf-invoices.php(383): BEWPI_Abstract_Invoice->generate()
    #3 /var/www/clients/client2/web71/web/wp-includes/class-wp-hook.php(286): BE_WooCommerce_PDF_Invoices->admin_pdf_callback('')
    #4 /var/www/clients/client2/web71/web/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Arra in /var/www/clients/client2/web71/web/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php on line 9442
    

    I’m not using any of the filters you mentioned.

    I am also having the same issue…
    Fatal error: Uncaught exception ‘MpdfException’ with message ‘Unable to create output file: /home/everyeg3/public_html/agentoperations/wp-content/uploads/woocommerce-pdf-invoices/attachments/2018/2716-2018.pdf’ in /home/everyeg3/public_html/agentoperations/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php:9442 Stack trace: #0 /home/everyeg3/public_html/agentoperations/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-document.php(204): mPDF->Output(‘/home/everyeg3/…’, ‘F’) #1 /home/everyeg3/public_html/agentoperations/wp-content/plugins/woocommerce-pdf-invoices/includes/abstracts/abstract-invoice.php(321): BEWPI_Abstract_Document->generate(‘F’) #2 /home/everyeg3/public_html/agentoperations/wp-content/plugins/woocommerce-pdf-invoices/includes/woocommerce-pdf-invoices.php(574): BEWPI_Abstract_Invoice->generate() #3 [internal function]: BE_WooCommerce_PDF_Invoices->attach_invoice_to_email(Array, ‘customer_invoic…’, Object(WC_Order)) #4 /home/everyeg3/public_html/agentoperations/w in /home/everyeg3/public_html/agentoperations/wp-content/plugins/woocommerce-pdf-invoices/vendor/mpdf/mpdf/mpdf.php on line 9442

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot generate PDF’ is closed to new replies.