muriloventuroso / pdftricks

A simple, efficient application for small manipulations in PDF files using Ghostscript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PDF Compress fails to compress

Gasious opened this issue · comments

After introducing a PDF file, the compress function does nothing with the size of the file on recommended compression, the medium compression leaves a 2.2kb blank PDF file, the really small option does the same.
It is smaller, but not in the way i'd consider usable.

commented

I tried out this app for recompressing a 8.5 MB four-pages PDF file, and the results have surprised me as well:

  • 457 kB for the "Extreme" compression level, and the quality there was so bad it made the images unreadable with lots of "moiré" and compression artifacts
  • 8.5 MB for the "Recommended" (presumably "medium") compression level
  • 8.5 MB (again) for the "Less compression" level

I would have expected the recommended level to be somewhere of a middleground, maybe 2-4 megabytes.

Ideally, it would be nice if you could simply select the target filesize and/or DPI. It would help if the compression could use MozJPEG too (better quality at lesser filesizes, compatible with every JPEG reader I've encountered so far), but I don't know if PDF tooling allows that.

PDFTricks uses ghostscript as a backend for processing files. It has pre-defined levels of compression. These levels work on most files, but depending on how the PDF was generated it may behave unexpectedly.