demo

Quick Drop

How to compress PDFs for free quickly?

PDF files are widely used for sharing documents, but they can often be quite large, making them difficult to send via email or store on limited disk space. Fortunately, there's a handy tool called ShrinkPDF that can help you compress your PDF files quickly and easily. In this blog post, we'll walk you through the steps to use ShrinkPDF and reduce the size of your PDF files.

Prerequisites

Before we begin, make sure you have the following:

  • Ghostscript installed on your system
  • The ShrinkPDF script from the aklomp/shrinkpdf GitHub repository

Step 1: Install Ghostscript

ShrinkPDF relies on Ghostscript to compress PDF files. If you don't have Ghostscript installed, you can install it using your system's package manager. On macOS, you can install Ghostscript using Homebrew:

brew install ghostscript

Step 2: Download the ShrinkPDF Script

Clone the ShrinkPDF repository from GitHub using the following command:

git clone https://github.com/aklomp/shrinkpdf.git

Alternatively, you can download the script directly from the repository's raw file.

Step 3: Make the Script Executable

Navigate to the directory where you downloaded the ShrinkPDF script and make it executable using the following command:

chmod +x shrinkpdf.sh

Step 4: Compress Your PDF Files

Now you're ready to compress your PDF files! Run the ShrinkPDF script followed by the path to your PDF file:

./shrinkpdf.sh -o compressed.pdf path/to/your/file.pdf

Additional Options

ShrinkPDF provides a few additional options to customize the compression process:

  • -g: Enable grayscale conversion which can further reduce output size.
  • -h: Show this help text.
  • -o: Output file, default is standard output.
  • -r: Resolution in DPI, default is 72.

You can explore these options to fine-tune the compression settings according to your needs.

Use ShrinkPDF with QuickDrop

You can integrate ShrinkPDF easily with QuickDrop by adding the following shell script to the Quick Action Panel:

/path/to/shrinkpdf.sh -o "{{inputFolderPath}}/{{inputFileNameWithoutExtension}}_compressed.{{inputFileExtension}}" "{{inputFilePath}}"
settings

After that, you can drop any PDF file onto the Quick Action Tile for compression

compress pdf

Home - Blogs - Change logs

© An Tran - 2024. All rights reserved.