I had been having a lot of trouble getting the PDF invoice link to download a proper PDF in Web Invoice.
The error states as follows:
Adobe Reader could not open ‘web–invoice-xxxxxx.pdf’ because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).
This error is generated because the pdf is in fact an empty file.
I knew that the PDF generation library DOMPDF was working properly because the emailed version of the PDF worked perfectly. It was the link on my websites invoice page that wasn’t working.
It took me a while to figure out but I discovered that the WP-Minify WordPress plugin was causing the problem. I’m sure that it somehow corrupted the PDF generation.
If you want to keep WP-Minify and Web Invoice working together you need to omit the URI you have selected as your Web Invoice page in the WP-Minify settings.
Setup Web Invoice
And exclude the URI for Invoices from you WP-Minify Settings
I will continue investigating to see if there is a way to only exclude the PDF generation from wp-minify