From cd81717f0baa76fdc2f5c598488fde344f4b21d9 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 12 Jan 2021 15:38:14 +0100 Subject: [PATCH] Added pdf compression script --- pdfcompress.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 pdfcompress.sh diff --git a/pdfcompress.sh b/pdfcompress.sh new file mode 100755 index 0000000..c9c90f5 --- /dev/null +++ b/pdfcompress.sh @@ -0,0 +1,12 @@ +#!/bin/bash +name=$1 +gs \ + -dNOPAUSE \ + -dBATCH \ + -sDEVICE=pdfwrite \ + -dQUIET \ + -dCompatibilityLevel=1.4 \ + -dAutoRotatePages=/None \ + -dPDFSETTINGS=/ebook \ + -sOutputFile="$name-ebook.pdf" \ + "$name"