Compress your PDFs in your terminal with a single command. Built on compress-pdf.
Prerequisite:
- Node.js v18+
- Ghostscript - Must be installed and added to system PATH
Install globally:
$ npm i -g @fusionfroze/squishFor local development:
$ npm install$ npm linkType this command in the directory where the PDF is saved that is to be compressed
$ squish example.pdfIt compresses the PDF and saves it in the same directory appending '_compressed' at the end of the original PDF name.
You can choose the compression level by using flags. The flags are as follows -
Options:
--vl, --vlow minimal compression, highest quality (300 dpi), best in professional settings, 'prepress' in compress-pdf
--l, --low low compression, high quality (300 dpi), best for everyday use, 'printer' in compress-pdf
--h, --high medium compression and quality (150 dpi), 'ebook' in compress-pdf
--vh, --vhigh highest compression, lowest quality (72 dpi), 'screen' in compress-pdf
-h, --help display help for commandExample usage:
$ squish --vh example.pdf