

On Debian/Ubuntu based distributions, use the following command to install Ghostscript: $ sudo apt install ghostscriptġ. However, you can still try to install it just to make sure. Most Linux distributions include the open source version of Ghostscript already. You can use Ghostscript command line tool for compressing a PDF file.
Free pdf resizer chrome how to#
How to use Ghostscript command to compress PDF file in Linux Systems ? These huge files may hog network bandwidth, waste space on company storage devices or be too big to share as email attachments.įortunately, Ubuntu provides a complicated, but efficient method to reduce the size of your PDFs using the standard Ghostscript library of command line utilities. This article covers how you can compress the PDF file size in Linux and its distributions like Ubuntu.Īlthough applications like LibreOffice Writer allow you to convert your business documents into portable and secure PDFs, sometimes the files they produce are too large and unwieldy. dPDFSETTINGS=/printer: output ideal for printer quality.

dPDFSETTINGS=/prepress: high quality output and size. dPDFSETTINGS=/ebook: better quality with slightly larger file size. dPDFSETTINGS=/screen: for lower quality and smaller size output. Now you can use following command to shrink the PDF file size: $ gs -sDEVICE=pdfwrite -dComatibilityLevel=1.4 – dPDFSETTINGS=/prepress -dNOPAUSE -dQUIT -dBATCH -sOutputFile=compressed_PDF_filename.pdf inputfilename.pdfīelow are the -dPDFSETTINGS options, which you can use according to your need: If not, use the following command to install ghostscript: $ sudo apt-get install ghostscript In command-line method, we’re going to use the tool named ghostscript, for compressing PDF files.īefore proceeding with compression method, make sure you have ghostscript installed on your Ubuntu desktop. How to Compress PDF Files Using Command Line Method on Ubuntu ? In this context, we shall look into how to compress PDF file without compromising with data in it on Ubuntu. Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Linux queries. Sometimes it becomes difficult to share or upload PDF file because of size limit restrictions on different websites. It keeps the data on file intact as you can not edit PDF files. And this file is PDF file, because it is most secure file format out there. Whether you’re filling an online form or delivering end-product documentation, everything needs to be done through file sharing. If you are also suffering from this issue, you have come to the right place. However, by stuffing tons of data such as images and graphics, the PDF file size can get too big to share via emails. PDFs offer us one of the most convenient ways of sharing images.
