- π¦πΊAustralia nigelcunningham Geelong
Hi again.
I've taken a look today at adding this, and would like to do some tidyups before merging it - will it be a problem to you if I commit a modified version?
We supported several Drupal 7 sites which used the PrinceXML commercial PDF engine. Unfortunately a PrinceXML interface was not supported past Drupal 7. We tried to use the existing PDF engines for Drupal 8/9, but could not get our output to match what we did with Prince. We ended-up writing our own interface.
The downside of this is we have to patch Printable with every release to work; Ideally PrinceXML would be supported natively.
I'm attaching documentation and patches on what I've changed to work with the latest Printable 2.1.4 release. So even if we cannot get PrinceXML added, at least others might have a way to use it.
mkdir -p modules/custom/princexml/vendor
cp -Rp ../vendor/mikehaertl/* modules/custom/princexml/vendor/
patch -p1 < 2495551_vendor_princexml.patch
patch -p1 < 2495551_pdf_api_222_princexml.patch
patch -p1 < 2495551_printable_214_princexml.patch
vi ../composer.json
), adding a new (or editing your existing) autoload section to look like },
"autoload": {
"psr-4": {
"ljackwilson\\princexmlto\\": "web/modules/custom/princexml/vendor/phpprincexmltopdf/src",
"ljackwilson\\tmp\\": "web/modules/custom/princexml/vendor/php-tmpfile/src",
"ljackwilson\\shellcommand\\": "web/modules/custom/princexml/vendor/php-shellcommand/src"
}
}
}
drush cr
)/admin/config/user-interface/printable/pdf
. You should have a new radio button option for princexmltoPDF under the PDF Generation Tool section./usr/bin/prince
modules/custom/princexml/vendor/phpprincexmltopdf/src/Pdf.php
. Where to make those changes is commented.Since this makes changes to printable, pdf_api, and mikehaertl, I'm not sure what the process would be to make that happen in an official way. And if no one else needs PrinceXML, then it isn't worth the effort. But I assume since it was available for Drupal 7 then maybe there is sufficient interest to make it work for Drupal 9 and beyond.
Active
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Hi again.
I've taken a look today at adding this, and would like to do some tidyups before merging it - will it be a problem to you if I commit a modified version?