Closed laryn closed 8 months ago
RE: Licensing between GPL and LGPL, see here. And further in the comments some simplified math for people like me: LGPL + GPL → GPL
but LGPL-3.0 + GPL-2.0-or-later → GPL-3.0-or-later
.
But it seems like print can't see the TCPDF library wrapped by that module? https://forum.backdropcms.org/forum/tcpdf
After enabling the TCPDF wrapper, and this module's:
The site still says "No PDF generation tool found! Please download a supported PHP PDF generation tool. Check this module's INSTALL.txt for more details."
The Webform2PDF module uses TCPDF module to create its PDFs; maybe look at that module to see how to include the library in another module.
There is likely some integration work needed to find the new wrapper module and use that library, but I doubt it would take too much effort.
Yes, the integration is pretty simple, but there are some issues with all the pdf related functions, mostly product of coder_upgrade. See for example this line (!!!)
@laryn, PR provided.
There were some confusing handlings of config files (originally handled by variables in D7). This affected the display of the PDF version link. In D7, the text for the link was stored in a variable such as print_html_link_text
and print_pdf_link_text
. In Backdrop, previous work moved the value of the HTML printer friendly version text into config print.settings
. The problem is that the text for PDF version is being stored in print_pdf.settings
. So, I had to insert an if statement to find it in the correct location. Otherwise, the other option might be to store the HTML text in print_html.settings
, but that would required lots of changes, plus an upgrade hook, since it would need to change existing installations.
Thanks @argiepiano for that PR, I had a chance to test it today and it's a big improvement. Thanks @bugfolder for the wrapper module!
I don't actually have a site that's using this module currently, but I think merging your improvement and leaving further cleanup to config files as a sometime-future project makes sense.
Can we bundle PDF libraries in the related submodules? Or make wrapper modules for these libraries and add as dependencies?