Ubuntu Server 18.04 LTS
SuiteCRM 7.12.8
PHP 7.4 → 8.0
Updated PHP from 7.4 to 8.0 using ppa:ondrej/php. After the PHP upgrade the Legacy mPDF engine option was no longer available in the PDF Settings dropdown menu in the Admin panel and all PDF templates were broken. I’m guessing the version of mPDF on my system is not compatible with PHP 8.0 but am at a loss on a way forward. Any suggestions?
Switching PHP back to 7.4 fixed the issues but I need to resolve as PHP 7.4 is no longer maintained.
If it isn’t related to the PHP version do you know why the mPDF Engine is available when using PHP7.4 but not visible under PHP8.0?
If there was a mPDF deprecation does that mean SuiteCRM is moving away from mPDF going forward? Should we be reformatting all of our PDF templates to be compatible with the TCPDF Engine? TCPDFs incompatibility with HTML and CSS makes reformatting a nightmare…
I’m using a current SuiteCRM version (7.12 ESR) from November 2022 and the mPDF comparability issue with PHP 8.0 is not resolved. If I switch from PHP 7.4 to PHP 8.0 the mPDF engine is no longer available using the drop down menu in the Admin panel.
I have fresh (bitnami) installs of 7.12.8 and 8.2.1
Neither have an option for mPDF from the Admin panel.
They are fresh installs, but I don’t know how to tell if they have the PR, other than manually checking some of the code, which does look like it includes the PR.
I don’t see any errors.
I just loaded a fresh 7.12.5 with PHP 7.4.28, but don’t have mPDF in the dropdown.
Does mPDF have to be installed or allowed somewhere before it will show up on the Admin/PDFSettings dropdown?
Hello @CRMSigns
I went back and installed a fresh stack with 7.12.1 and PHP 7.4 and still don’t see mPDF as an option.
Is your 7.12.8 ESR a fresh stack? Did you make any changes other than downgrading to PHP 7.4?
Has anyone else seen mPDF as an option?
I’ve now tried four different versions… Not sure what I’m doing wrong.
The highlighted text pulls out the mPDF option from the available PDF Engines if PHP version is 8.0+
I’m not sure if that’s because of dependency issues or other tests that proved instability or vulnerabilities with the mPDF engine with PHP8+, but this was written into the code in the commit that @pgr shared, “Implement TCPDFEngine”.
I don’t know all the details of this, but I would say that it will be quite some work to get mPDF working on the newer versions - it probably involves using a newer mPDF version than the one that the SuiteCRM code is ready for.
I would advise (if you don’t want to sponsor me to get my PowerReplacer sponsorware) that you invest in fixing any TCPDF problems that you have, instead.
So it seems the decision to deprecate mPDF was likely based on newer technical requirements for PHP8+ being incorporated into the processing of PDF output within SuiteCRM. As an open-source product, I can see how it makes sense to maintain focus on one engine instead of spreading compatibility efforts among many.