Unable to generate PDF - v1.4.3

Hello Zaziork,

I’m glad I could help. :smile:

I can’t take all the credit, I followed this debugging process using the mpdf.php library from the InvoicePlane software distrib, and I found the error in the HTTPD logs then. Something in InvoicePlane must be suppressing these PHP errors from getting logged.

Troubleshooting for MPDF “blank screen” issue:
http://mpdf1.com/manual/index.php?tid=331

Cheers!

1 Like

Seems to be a bug with library itself, it wasn’t touch since the update to mPDF 5.7.4.
Which file did you downloaded? From the 6.0 version? Because 5.7.4 is the “latest stable”.

The file I’m now using, that fixed the issue, is from version 5.7.4, as EPEC linked above, here:
http://mpdf1.com/repos/MPDF574UPGRADE573.zip

The version I was using before was just the version as packaged in the Invoice Plane download (downloaded last week).

Thats really strange because it should be exactly the same file…

Hello Kovah,

You’re right, something is very weird. I just downloaded the Invoice Plane zip file on my laptop as well as the MPDF file I linked yesterday, and I am finding no difference. Even the md5sum of the two files match.

It’s curious, because I downloaded the zip file directly on my server yesterday and unzipped it on the command line, just like I just now did on my laptop.

Maybe it has something to do with the version of the “unzip” binary on our servers? What version of Linux were you running when you extracted the file zaziork?

No i can’t imagine that unzipping changes a file in that way. That’s really strange but I’ll send out a notice that you found the cause for this problem.

Hello Kovah,

I just tested it and confirmed.

On both systems I used wget to fetch the Zip file from your server (wget https://invoiceplane.com/download/v1.4.3 -O invoiceplane.zip && unzip invoiceplane.zip).

I did this on my laptop (Linux Mint Debian Edition) and my invoice server (CentOS 7). Curiously both versions of the “unzip” binary appear to be the same.

However, I got different MD5 hashes after extracting the zip file.
c585bf5fd30f08c47c27f718376f9ca6 application/helpers/mpdf/mpdf.php
1216833cd85e5af3887984f49c091d27 application/helpers/mpdf/mpdf.php

1 Like

I can confirm that this fixed the original request issue on our server! Thank you so much!!!

MD5 Hash list
v1.4.3.zip file: fd892ac75dc848e95059829485eb2db6
mpdf.php file: c585bf5fd30f08c47c27f718376f9ca6

Please check if these hashes match your files. I uploaded a new zipped archive, maybe it was a faulty zipped archive that caused the problem.

I downloaded the new zipped archive to my server and verified both hashes.
The hash for the new mpdf.php was different to the mpdf.php that I downloaded yesterday (from the aforementioned link), however I substituted the new version and everything still works fine.

The file was unzipped on the base system, which is Centos 7. But the application is actually deployed in a Docker container, running Ubuntu 14.04.2. I transfer the files through a directory mounted inside a persistent container.

Worked Perfectly. Thank you for finding this fix and sharing it.

everything was going well, but we have started noticing that the Report is skipping invoices. Looked into log and this is what it shows: http://paste.ee/p/f4s3W

Can anyone assist, I have a problem when saving, or updating invoice, quotes or clients details. The system does not save instantly, it keeps the old details if im updating and also no new data shows if i’m creating. The changes only take effect after some hours or so.

I tried everything to make it work but nothing seem to work.

Hi there, I tried downloading the newest version of mpdf and replaced the mpdf.php file on my server but the 500 Internal Server Error still persists.

Can someone please advice?

Thanks

Please take a look at your webserver error logs. Error 500 should be logged there.

I’ve had similiar problems with a Nginx/php-fpm setup. The PDF generation / view requests CSS via the configured domain (e.g. http://example.com/assets/default/css/templates.css). If you have IP blocking configured through e.g. a firewall or server config this may cause the PDF generation to fail.

I had blank PDFs as well and it was due to a corrupted template file:PDF Generation issue. Invoice not found in DB?

Hi, it seems the MPDF library link is dead, is there another way to resolve this?

This topic is outdated anyway. The current version is 1.4.10 which shipps with a new major version of mPDF.

you are correct, I tried InvoicePlane at a local machine and wouldn’t work with the pdf but on the production server it’s working fine. thanx and sorry for the trouble :slight_smile: