muriloventuroso / pdftricks

A simple, efficient application for small manipulations in PDF files using Ghostscript.
90 stars 14 forks source link

PDF Compress fails to compress #52

Closed Gasious closed 3 years ago

Gasious commented 3 years ago

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.

nekohayo commented 3 years ago

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

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.

muriloventuroso commented 3 years ago

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.