2020-10-27 Shrink PDF

Got a scanner. Scanning documents. 2MB for a black and white document is too big! Found a solution online:

pdf2ps -dLanguageLevel=3 document.pdf
mv document.pdf document.pdf~
ps2pdf -dPDFSETTINGS=/ebook document.pdf

The first command generates a postscript (PS) file, the second command renames the PDF file, and the third command generates a PDF from the PS file using the ebook settings. The result is that my 1.9M file shrunk to 343K.


How is the quality of the smaller PDF?

– Unnamed 2020-10-27 20:49 UTC

This messes up (or rasterizes) any alpha transparency layers in the PDF.

– Sandra Snan 2020-10-28 08:18 UTC

Of course. And colors are lost, dpi is reduced to 150, and probably more stuff. But it’s a legible copy of the document and so I’m happy. This was a “please send us a copy of this document” situation.

– Alex Schroeder 2020-10-28 09:53 UTC

Just using ps2pdf on the pdf usually works great

– Isidoro 2021-01-27 19:25 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Just say HELLO