Adds command to compress pdf files

This commit is contained in:
Thomas Forgione 2021-10-11 14:09:20 +02:00
parent 2cd6e3aea3
commit 6f63ce00ec
1 changed files with 9 additions and 0 deletions

9
bin/compress-pdf Normal file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
if [ $# -ne 2 ]; then
echo >&2 "errror: wrong number of arguments"
echo >&2 "usage: compress-pdf <input> <output>"
exit 1
fi
gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$2 $1