mirror of
https://github.com/tezzytezzy/pdf-batch-compressor.git
synced 2024-09-22 00:00:44 +02:00
Bash script to compress PDF files via Ghostscript
pdf_batch_compressor.sh | ||
README.md |
PDF Batch Compressor
Functionality
This nifty utility compresses PDF files via Ghostscript in the folder where this script resides:
1️⃣ Create a sub-folder, ./compressed, and put the resultant compressed ones in it,
2️⃣ Compress files with any PDF extentions i.e., .pdf, .PDF, .pDf and so on,
3️⃣ Optional compression parameter to be supplied, namely, prepress, ebook (default) and screen - in the descending order of quality, and
4️⃣ Log output with the compressed file names and any error message in the sub-folder
N.B. Make sure to make this script excutable via chmod +x or 755, after downloading!
Installation
(base) to@mx:~$ bash --version
GNU bash, version 4.4.12(1)-release (x86_64-pc-linux-gnu)
(base) to@mx:~$ gs --help
GPL Ghostscript 9.26 (2018-11-20)