• Resolved oto7728

    (@oto7728)


    Hi Booster For WooCommerce,

    I really love Booster Woo Commerce plugin, it really adds much functionality to my website. Currently, I’m having a little issue in the PDF invoices: i cannot open it neither download it. This is the error message that shows up… https://ibb.co/yS9xSHP Can you help me to find out the solution to this?

    THank You!

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi,

    Could you share some screenshots of “PDF Invoicing” module settings?

    Thread Starter oto7728

    (@oto7728)

    Thread Starter oto7728

    (@oto7728)

    Hello, are there any updates on my issue? Here are some pictures of the PDF:
    https://drive.google.com/drive/folders/1yb_r1AvOaWDyWJMWetKA4c4ZzNZtiYGv?usp=sharing

    Please keep me posted. Thanks.

    Same here.

    Latest paid version. Latest WP and Woo.

    Chrome error: “Error: failed to load pdf document”. Other browsers show slightly different wording but same error.

    I need to launch this ecom site in a few days… anything you can do it appreciated.

    N/m solved it…

    My issue is the site is under construction so I have debugging on in wp-config.php:

    //define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', true);
    define('WP_DEBUG_LOG', true);

    Commenting out the first line, as shown above. allows PDF invoices to print.

    While under construction, WP_DEBUG is showing a handful of minor errors/warnings about certain deprecated functions from other code in the site but nothing major so I’m guessing just any old warning or error is mucking up the output and the pdf creation process and making the pdf unable to render correctly.

    Booster team… please close my support ticket on your site… there’s no way it seems for me to do it.

    Also, your plugin rocks. Rebuilding our website I’ve been able to elimiate countless other (mostly poor quality) plugins for your very organized and functional code! Love you guys! Best money I’ve ever spent!

    Hello,
    Please check if one of the alternatives could fix the issue:

    • Reset settings on PDF INVOICING & PACKING SLIPS > Templates. Please, copy the template’s content first
    • Disable header on PDF INVOICING & PACKING SLIPS > Header
    • Change fonts on PDF INVOICING & PACKING SLIPS > Styling
    • Switch the Enable “Save as” option on PDF INVOICING & PACKING SLIPS > Display & Misc.
    • Activate the Disable Saving PDFs in Temp Directory option on PDF INVOICING & PACKING SLIPS > Advanced
    • Disable the Prevent Output Buffer option on PDF INVOICING & PACKING SLIPS > Advanced
    • This reply was modified 4 years, 6 months ago by Pablo Pacheco.
    • This reply was modified 4 years, 6 months ago by Pablo Pacheco.
    • This reply was modified 4 years, 6 months ago by Pablo Pacheco. Reason: styling
    Thread Starter oto7728

    (@oto7728)

    Hi,

    Thanks for your prompt reply.

    I have tried following your alternative solutions:
    1. Resetting
    2. Disabling header:
    3. Change fonts
    4. Switch Enable “Save as” option
    5. Disable Saving PDFs in temp directory
    6. Disable prevent output buffer (the default is already disabled though)

    The output is as following, the PDF invoices are downloaded to my disk but unable to open the file, I don’t know what the issue is.:
    https://ibb.co/Yym3n9f

    Thread Starter oto7728

    (@oto7728)

    Hi,

    Nevermind I tried the solution suggested by @fitwarrior and it works for me too… Thank You…

    Booster team,

    Would you please fix this permanently when you have a moment? That is, allow the pdf to print even with debugging on (with a “define(‘WP_DEBUG, true);” statement in wp-config.php).

    Most of us prefer to keep error logging turned on, for obvious reasons, but then we can’t print invoices ??

    Plugin Author ronyp

    (@ronyp)

    Hello @fitwarrior,

    If you want to keep debug enable, why don’t you prefer to save that in debug.log file instead of showing on the website?

    Why don’t you try below, which will allow you to debug log also and pdf will also be fine and warnings, errors and notices will not be shown directly on the website.

    // Enable WP_DEBUG mode
    define( ‘WP_DEBUG’, true );

    // Enable Debug logging to the /wp-content/debug.log file
    define( ‘WP_DEBUG_LOG’, true );

    // Disable display of errors and warnings
    define( ‘WP_DEBUG_DISPLAY’, false );
    @ini_set( ‘display_errors’, 0 );

    // Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
    define( ‘SCRIPT_DEBUG’, true );

    Regards,
    Rony P – Support Team

    The problem is the pdf won’t print when ANY type of debugging is in place, even just error logging to /wp-content/debug.log

    That is,

    You’re suggesting to show errors only in log file:
    define('WP_DEBUG_LOG', true);

    instead of show errors on screen:
    define('WP_DEBUG_DISPLAY', true);

    But both of these require:
    define('WP_DEBUG', true);

    … and it’s this last line, when active in wp-config.php, that throws an error when trying to print pdf.

    Ok, might have it solved…

    This seems to work:

    @ini_set( 'log_errors', 'On' );
    @ini_set( 'display_errors', 'Off' );
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    This allows me to allows me to log errors (in debug.log) without showing them on screen
    AND allows pdf invoices to print ??

    Plugin Author ronyp

    (@ronyp)

    Hello @fitwarrior

    Thank you for letting us know. Marking this as resolved now.

    Regards,
    Rony P – Support Team

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘PDF Invoices : Failed to Load PDF document’ is closed to new replies.