Skip to main content
[ADDON] PDF Print Started by Spuds · · Read 70975 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Re: [ADDON] PDF Print

Reply #30

The permission to use the PDF function is, critically, tied to the "send topics to friends".  Remove that permission and the PDF function should be disabled for those users.

I could easily add a feature to disable the images in the output, I'll see if I have time this weekend.  If you are in a rush you can edit the elk-pdf class and set the validImageTypes variable to an empty array.

Re: [ADDON] PDF Print

Reply #31

This ElkArte addon replaces the default print button with a create PDF.   Clicking the PDF button will output a PDF to the browser of the current topic, including images and links.  The user can then print or save the PDF.

The package file is large due to the included TTF fonts, so your server will need to support uploads of 4M ... if not use the download from addons site option as outlined below.

Here is what is new in V1.1.0

  • This new version only supports ElkArte 1.1+
  • Address various issues with PHP 8.1
  • Update tfdpf library to pull in the latest tpdf updates (as of 1.84)
  • Add support for WEBP attachments
  • Fix issue where a topic image could be reused in the wrong post due to naming reuse in the library (a PDF optimization error)
  • Fix issue where a normal below post attachment would cover the post text if preceded by a post with an ILA attachment
  • Improve line spacing in lists

To get the addon you can do one of two things:
  • You can download the file from the Addons site and then upload that file to your server
    • Admin > Packages > Upload > Select the zip file you just downloaded > Upload
  • Or Download it directly to your site
    • Admin > Packages > Download Package > click "Browse" by "ElkArte Third-party Add-ons Site", expand Enhancement > Print to PDF > [Download] (use the button)
Last Edit: November 06, 2022, 03:38:23 pm by Spuds

Re: [ADDON] PDF Print

Reply #32

This ElkArte addon replaces the default print button with a create PDF.   Clicking the PDF button will output a PDF to the browser of the current topic, including images, attachments, and links.  The user can then print or save the PDF.

The package file is large due to the included TTF fonts, so your server will need to support uploads of 5M ... if not use the download from addons site option as outlined below.

Here is what is new in V1.2.1

  • Address various issues with PHP 8.2
  • Update tfdpf library to the latest (improved PHP 8.2 support)
  • Improved processing / formatting of ILA and Gallery images
  • Change to use DomDocument instead of the simple dom php library

To get the addon you can do one of two things:
  • You can download the file from the Addons site and then upload that file to your server
    • Admin > Packages > Upload > Select the zip file you just downloaded > Upload
  • Or Download it directly to your site
    • Admin > Packages > Download Package > click "Browse" by "ElkArte Third-party Add-ons Site", expand Enhancement > Print to PDF > [Download] (use the button)
Last Edit: February 09, 2024, 11:45:37 am by Spuds

Re: [ADDON] PDF Print

Reply #33

Hi, I installed this latest version cause the version I had installed has an error when exporting one of my threads. I first uploaded via package manager, but it told me I had the latest version already. I didn't trust him, so I uploaded the files manually on the server. Big mistake!  :zipper_mouth:

And now I crashed the pdf export. I get this error message in every thread when I try to export to pdf:

Ein Fehler ist aufgetreten!
DOMDocument::loadHTML(): Tag time invalid in Entity, line: 1

Can you help me? If not I have to install a backup...

 

Re: [ADDON] PDF Print

Reply #34

Sorry I did not see this sooner ...

Must be due to the custom theme and DOMDocument not knowing what the HTML time tag is ... try the attached file, replacing the one in your subs directory.