cannot open created PDF with adobe only Microsoft Edge works

Hi,

i can’t open a created PDF from suitecrm with adobe reader or other pdf-viewer. Only Microsoft edge open all pdf without errors.
Error from adobe “could not open because it is either not a supported file type”

This error only occurs if i put a letter in the pdf template in the header or footer area.
If header and footer of the template is empty, all works fine.

I use suitecrm version 7.10.6 on windows 10 with xammp.

i found a possible solution of the same problem to put a “ob_clean();” before the $mpdf->Output(); in the “generatePdf.php” file.
But this don’t work for me.

I tested this on an invoice and an offer. Always the same problem.

thanks for any info.

I don’t know the answer, but I can tell you that SuiteCRM uses a helper software for this, it’s called tcpdf.

Maybe you can Google for some more solutions with this information. Good luck, and tell us what you find.

are you sure it is tcpdf?
Because my “generatePDF.php” on line 147 contains “mpdf”!
$pdf = new mPDF(‘en’, $template->page_size…

is there any possibility to change or update the pdf-engine?
Because the mpdf-version in suitecrm is on 5.7.1 and the current newest version is 7.0.

I guess we have two PDF engines!

mpdf is used in AOS_PDF_Templates, originally from SalesAgility.

tcpdf is part of SugarCRM code.

It is possible to upgrade packages but it takes some work. Normally it’s more complicated than just pulling in new code. From 5.7.1 to 7.0 sounds like a big change.

SuiteCRM uses Composer to facilitate this, but the introduction of composer was recent, and these PDF modules have not been moved to the “vendor” directory and added to composer in our code.

1 Like

I solve my problem on changing the webserver application.
Now i uninstalled xammp on windows and use IIS and MS-SQL-Server instead.

The installation was much more difficult than with xammp but now ALL WORKS PERFECT!!

I think nobody should use xammp for productive systems.