Closed CommuniG8 closed 1 month ago
Hello @CommuniG8!
Thanks for raising this issue!
Regards, Serhii
Hi @CommuniG8 ,
Thank you for highlighting this issue.
Support for mPDF lib had been dropped in version 7.12, due to MPDF's License no longer being compliant with AGPL3. Although mPDF is not removed on upgrades and we still left an option to fallback to it.
As custom work you could try to add an extension using a newer version of mPDF that is compatible with php 8. However we cannot include that in the core product due to the already referred license issues.
The team will be focusing of fixing the issue with TCPDF in a later release of SuiteCRM.
In the meantime, we will close this issue for the reasons mentioned above.
That is a pity as it means, currently, SuiteCRM has no means at all to produce a correctly formatted PDF in Landscape orientation.
@CommuniG8 are you using the same mpdf.php that was part of SuiteCRM before this change (5.7.1, see here)? Or are you using a newer version? If it's different, you need to check if the constructor of the mPDF class was changed. The 'orientation' is one of the positional parameters passed into it.
The calling code is here, I believe.
@pgorod mpdf.php is 5.71 but without the constructor change. I changed the function, as in the link you gave, but it makes no difference.
The newest version of mpdf supports php 8: https://github.com/mpdf/mpdf
Ideally, someone who uses this should upgrade mpdf, adapt SuiteCRM to that new version, and make a PR here with those changes.
Then we would close that PR without merging (due to the licensing problems), but we could point people there is they want to use mpdf.
If the Admin PDF Settings is set to use the Legacy MPDF Engine and a PDF Template with Orientation Landscape checked is used, the PDF is generated as Portrait, as if Orientation had been set to Portrait. The orientation works correctly using the TCPDF Engine.
Expected Behavior
The PDF should be generated in Landscape orientation when Orientation Landscape is checked in the PDF Template.
Actual Behavior
The PDF is generated in Portrait orientation regardless of the Orientation setting in the PDF Template.
Steps to Reproduce
Context
We have a number of PDF templates with enough columns to need a Landscape Orientation. We cant use the new TCPDF Engine due to the current issues with formatting a large number of columns.
Your Environment