Why is DomPDF suddenly not generating PDF files after PHP 7.4 upgrade?

I've updated my domPDF I think last year when it was suddenly not working after system update to PHP 7. Then I think yesterday (May 10), all system generated files are suddenly not generating the PDF file at all.

I turned on the warning/error reporting and it only says :link selector not valid. When I view the PHP source file/view page, there are no issues on it. (Btw, the php/html source file is dynamic with mySQLi queries). I tried removing all CSS in-page style and other HTML tags but no luck. Whenever I start downloading the PDF, it will just go plain white or literally blank page.

We are not editing the domPDF plugin at all recently and no changes were made in our files.

What could be the conflict with domPDF and PHP 7.4?

I came across a similar issue while google-ing

https://www.gitmemory.com/issue/dompdf/dompdf/2383/785209789

1 answer

  • answered 2021-05-10 23:53 Heiko

    domPDF works with PHP 7.4, so you have to try to set the warnings in the config of dompdf.php to true and see, what the problem are :-)