Reduce the size of PDF Files in Linux with Ghostscript

Want to compress the PDF Files?

You will now have the opportunity to compress the size of any PDF file via command line. The whole process takes hardly less than 1 minute to convert the PDF file with reduced size.

By reducing the file size, the document can easily be emailed, transmitted, and stored more efficiently.

Every PDF file is generated or produced according to a specification. This specification has evolved from version 1.0 to version 2.0. Sometimes users are faced with the dilemma that a certain application only recognizes a specific version of PDF file. For example, some journal publishers only accept submission of PDF files of version 1.4 or later, some obsolete Windows applications only read PDF files of version 1.2. Suppose you have a PDF file of version 1.1, what would you like to do?

Ghostscript is a high-performance Postscript and PDF interpreter and rendering engine with the most comprehensive set of page description languages (PDL’s) on the market today and technology conversion capabilities covering PDF, PostScript, PCL and XPS languages.

Your first step is to install the Ghostscript package by typing the following command in your terminal:

Command: sudo apt-get install ghostscript

Ghostscript is the only suite which provides the ps2pdf utility used to compress the PDF Files.

ps2pdf is implemented as a very small command script (batch file) that invokes Ghostscript, selecting a special “output device” called pdfwrite.

ps2pdf is a work-alike for nearly all the functionality (but not the user interface) of Adobe’s AcrobatTM DistillerTM product: it converts PostScript files to Portable Document Format (PDF) files.

Command: ps2pdf large.pdf small.pdf

Which reduce the size of large.pdf file and create a new small.pdf file in same location as shown below:

Note that the OutputFile will always be written, and if there is no (further) input the file will be a single blank page.

Step by step hacking tutorials about wireless cracking, kali linux, metasploit, ethical hacking, seo tips and tricks, malware analysis and scanning.