From 6f63ce00ecf066b4185c5b4057cd5c213933a850 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Mon, 11 Oct 2021 14:09:20 +0200 Subject: [PATCH] Adds command to compress pdf files --- bin/compress-pdf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bin/compress-pdf diff --git a/bin/compress-pdf b/bin/compress-pdf new file mode 100644 index 0000000..bd194b4 --- /dev/null +++ b/bin/compress-pdf @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [ $# -ne 2 ]; then + echo >&2 "errror: wrong number of arguments" + echo >&2 "usage: compress-pdf " + exit 1 +fi + +gs -sDEVICE=pdfwrite -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dNOPAUSE -dQUIET -dBATCH -sOutputFile=$2 $1