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 the command line. The whole process takes hardly less than 1 minute to convert the PDF file with a 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. To know all the differences, read more about the PDF file format. Sometimes users are faced with the dilemma that a certain application only recognizes a specific version of a 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 that 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 the 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.

Converting JPG To PDF

While having an image format, like JPG or Jpeg, is great for editing purposes, there are inherent limits to it. In the case of TIFF (Tag Image File Format), it’s also good for multiple images editing, but it’s not great for repeat edited images.

Most people don’t know that there are many different file types and formats in the computer world. Take note that the majority of the images out there haven’t been created using only one format. A lot of images, even if they’re created in a single format, will have multiple formats. This includes the images used in brochures, books, presentations, and in websites. With this said, it’s important to consider how images can be converted from one format to another.

Since Jpeg is widely used, there are many ways to convert it to various formats. One way to convert images in JPG to PDF format is to use a conversion tool. Most people choose to use Adobe Photoshop to do the conversion. Photoshop can open any kind of image file, whether it’s Jpeg or another format. It’s also easy to use and is one of the most popular programs to convert images to the most common formats on the Internet.
Converting pictures to the PDF format can create many benefits, such as the following:

  • Pictures have a better image quality.
  • You can save on effort and time because you can easily and securely fax PDF via email.
  • You can save money on paper and ink.

Once you’ve decided to convert your images, be sure to look around and find the right program to convert them.

You may also like:

Sarcastic Writer

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

Related Posts