From 7a621835f750b8f507c506da0e41c8c9932a5afa Mon Sep 17 00:00:00 2001 From: ndwarshuis Date: Thu, 25 Aug 2022 11:20:37 -0400 Subject: [PATCH] ADD pdf compression script --- dot_bin/compress_pdf | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 dot_bin/compress_pdf diff --git a/dot_bin/compress_pdf b/dot_bin/compress_pdf new file mode 100644 index 0000000..7061c75 --- /dev/null +++ b/dot_bin/compress_pdf @@ -0,0 +1,13 @@ +#!/bin/bash + +# Compress a pdf using ghostscript. I really don't understand what this is +# doing but it seems to work well. + +gs -sDEVICE=pdfwrite \ + -dCompatibilityLevel=1.4 \ + -dPDFSETTINGS=/prepress \ + -dNOPAUSE \ + -dQUIET \ + -dBATCH \ + -sOutputFile="$2" \ + "$1"