PDF from invoice not working

Greetings all.

I have the latest invoiceplane - 1.4.10 and I have a problem. If I want to “download PDF” (/index.php/invoices/generate_pdf/7) of any invoice, I get 500 Error. I can however generate a PDF of the invoice if I use a “guest preview” (/index.php/guest/view/generate_invoice_pdf/r2eeN2YqXactN31).

Anyone has the same problem?


Please follow the guide for occuring errors in the FAQ.

Yeah sorry. Here is the required stuff:

Log file: https://paste.invoiceplane.com/view/ce488b5c

Both server and chrome console logs state only the obvious. Its a 500 Error.

Thanks for help.

I’m also having the same issue.

Just installed a fresh copy of 1.4.10 and created one client and one invoice to test. I get the blank page for both emailing, downloading, and viewing from guest link. Since it is brand new, I am happy to share the link:

Here’s the log file, freshly generated after one request to:

Strange thing is that the http headers are returning a status ok / 200, but the page is still blank. I can’t find a 500 error anywhere in my server error logs.

I’m pretty familiar with CodeIgniter, so I’ve been trying to dig around as much as I can. I noticed that in the email routines, successfully sending the invoice is supposed to call the CI redirect function, but the redirect was never firing. I did my best to manually backtrace from there. The wall I finally hit is that the execution cycle dies the moment the new mpdf object is called on line 31 in mpdf_helper.php

"$mpdf = new mPDF();

No errors are returned or logged.

I’ve since downloaded and uploaded a new copy of the mPDF library, but no change in the end result.

What else can I try?

Did you turned on the debug mode? Because if it’s disabled errors may be suppressed.

Me? I have.

Yes, I have debug mode enabled as described in the FAQ

This is so strange. If I enable the debug mode and some errors occurr I get a detailed output and not only blank pages.

I can give you access to check it out if it helps :slight_smile:

I just tested with a manual install in my local environment and everything worked like a charm.

I did use Softaculous to install on my web server, so maybe that was funky. I’m going to wipe it and try a manual install to see if it makes any difference.

I didn’t. I did a manual install.

I have same issue… not able to generate pdf… no error in debug mode :


and I’m running it on cpanel… it works on previous version…

any suggestion ?

Solved, at least on my end.

The issue was the mPDF library.

Known Issues
Crashing with no error message

Ensure mbregex is enabled as part of mb_string. Apparently this is enabled by default when you enable mbstring in most cases, however with cPanel and some other non-standard environments this might not be the case, so people have to explicitly look for and enable mbregex (i.e. compile PHP with --enable-mbregex.

A Google search for “enable mbstring whm/cpanel” will return helpful instructions to enable it. I am seeing PDF invoices now with no problems!

1 Like