Monday, January 15, 2018

Compressing PDF File using (ghost)script

Dealing with Big PDF File can be pain in the a** especially when using slow internet connection or limited space on server.
Thus I've come across script on make things easier. Here's the script:
$ ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

You can get more explanation at:
https://www.internalpointers.com/post/compress-pdf-file-ghostscript-linux
or
https://gist.github.com/firstdoit/6390547

You might also want to check on pdftk and pdfchain on extracting and combining pdf

No comments:

Post a Comment

Please be polite and don't SPAM, Thanks :)