Menu

#141 pdfsizeopt integration

17.x
pending
Nikkho
None
2025-10-07
2024-12-16
No

Could you add the tool pdfsizeopt?
Here is the url:
https://github.com/pts/pdfsizeopt

Discussion

  • Nikkho

    Nikkho - 2024-12-16

    Thank you. As far as I know, pdfsizeopt required Python runtimes to be installed, so it is not a standalone plugin as FO requires. Am I right?

     
  • Nikkho

    Nikkho - 2024-12-16
    • status: open --> pending
    • assigned_to: Nikkho
    • Milestone: 12.x --> 17.x
     
  • Jean-Charles Meyrignac

    pdfsizeopt does indeed contain the Python runtime, but the zip is standalone.
    It performs optimizations on the pictures into the PDF, which is quite interesting.

     
  • Nikkho

    Nikkho - 2024-12-16

    Hi again. After a first glance look to pdfsizeopt I see it is mostly a wrapper as FO. It includes pngout and also Ghostcript. Not sure if it will be worth to duplicate both dependencies.

     
  • Renard Voß

    Renard Voß - 2025-10-07

    In fact, pdfsizeopt is "only" a wrapper like FO, but there are some interesting differences:

    1. pdfsizeopt produces better results, especially when pdf files contain png images. Then the filesize is usually about 20% smaller.
    2. pdfsizeopt doesn't keep file properties
    3. pdfsizeopt sometimes destroys contents of pdf files
    4. pdfsizeopt uses qpdf instead of cpdf
    5. pdfsizeopt and/or qpdf sets pdf file version to version 1 and deletes the file ID (while cpdf keeps the file ID although cpdf sets the pdf file version to version 2 and writes a comment to the file overwriting other information).

    Furthermore I told you before, that cpdf is not free for commercial usage. Since FO contains advertising banners and the possibility to "donate" FO is certainly commercial.

    Thus, it could be much better to use qpdf with nearly the same options pdfsizeopt does, if its possible to keep/restore the pdf file ID and version.

    qpdf can be found here:

    https://github.com/qpdf/qpdf

     
  • Nikkho

    Nikkho - 2025-10-07

    Thank you so much. qpdf was already added in FO 17.10:

    qpdf.exe --compress-streams=y --decode-level=generalized --recompress-flate --compression-level=9 --optimize-images --object-streams=generate

    Regarding FO, since ads as well as donation are optional, I would say is not commercial. Indeed you can donate to LibreOffice and no one would say it is commercial.

     

    Last edit: Nikkho 2025-10-07

Log in to post a comment.

MongoDB Logo MongoDB