Easily Compress PDF Files In Linux With Densify

Densify is a graphical user interface which simplifies the process of compressing PDF files on Linux with Ghostscript.

Densify PDF Compression tool

The tool, which uses Gtk and is written in Python, uses a simple interface which lets the user select the PDF file to be compressed, the PDF optimization level, and the output filename (compressed.pdf by default, so the original is not overwritten).

The PDF optimization levels are explained by clicking the ? button under Type, and are as follows:

  • screen: selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting / 72 dpi images
  • ebook: selects medium-resolution output similar to the Acrobat Distiller "eBook" setting / 150 dpi images
  • printer: selects output similar to the Acrobat Distiller "Print Optimized setting / 300 dpi images
  • prepress: selects output similar to Acrobat Distiller "Prepress Optimized" setting / 300 dpi images
  • default: selects output intended to be used across a wide variety of uses, possibly at the expense of a larger output file

Densify PDF Compress Linux

You'll want to try these settings and see which is best for your use case. For example, the screen and ebook PDF optimization level will compress your PDF more, but check out the quality after zooming in for a bit and see if you're satisfied with it.

Densify compresses PDF files using Ghostscript, a suite of software based on an interpreter for the PostScript language and for PDF. Its usage ranges from the rasterization or rendering of such files, or the display or printing of document pages, to the conversion between PostScript and PDF files.

Download and install Densify


To use Densify, you'll need Python2, python-gi, and Ghostscript. You can install these packages in Debian, Ubuntu and Debian/Ubuntu-based Linux distributions like elementary OS or Linux Mint, using:

sudo apt install python-gi ghostscript

Next, download the latest Densify .tar.gz archive and extract it in your home folder. You should now have a Densify-0.2.0 (the version varies) folder which you can install in /opt by moving it there:

sudo mv Densify-0.*.0 /opt/Densify

And finally, install the Densify menu entry (which expects the application to be installed in /opt/Densify) in /usr/local/share/applications/:

sudo mkdir -p /usr/local/share/applications/
sudo cp /opt/Densify/densify.desktop /usr/local/share/applications/

You should now find Densify in your applications menu.

In case you want to remove Densify from your system, you can use these commands:

sudo rm -r /opt/Densify
sudo rm /usr/local/share/applications/densify.desktop

3 comments:

  1. The application is not convenient. It is much easier to make Thunar custom aktion on the script:
    for i in *.pdf *.PDF ; do ps2pdf -dUseFlateCompression=true -dOptimize=true -dProcessColorModel=/DeviceRGB -dUseCIEColor=true -r72 -dDownsampleGrayImages=true -dAutoFilterColorImages=false -dDownsampleColorImages=true -dDownsampleMonoImages=true -dGrayImageDownsampleType=/Bicubic "$i" "$i".2 ; mv -v "$i".2 "$i" ; done

    ReplyDelete
  2. Perfect instruction and works very good!! Thnx

    ReplyDelete
  3. This alarm is all things considered, as it cautions the client that the record may open in an alternate application if the augmentation is changed. https://de.altosplitpdf.com/

    ReplyDelete

Powered by Blogger.