Posted on

SuiteCRM Print as PDF produces corrupted PDFs

Whenever you use the Print as PDF option, the output is unopenable (Acrobat says it’s been damaged). You can edit the generated pdf file with Notepad ++. You can see that before the start of the pdf text (% PDF-1.4), there is a list of php warnings. If you delete all these lines and save the file, you will be able to view your pdf.

Solution

This solution is valid for SuiteCRM versions 7.11.18 and 7.11.21.
These versions are not compatible with php higher than version 7.3. So upgrade your php to version 7.3 and everything will work.