config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

commit 4373e985c605f0823494060718b4bb13ab116fef
parent c06da1c806c64b06df8b136fa1d1cf605495bbb1
Author: dwrz <dwrz@dwrz.net>
Date:   Thu, 12 Jan 2023 20:46:30 +0000

Add compress-pdf script

Diffstat:
Ascripts/compress-pdf | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/scripts/compress-pdf b/scripts/compress-pdf @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +# option resolution +# default 72 +# screen 72 +# ebook 150 +# printer 300 +# prepress 300 +quality="$3" +if [[ -z "${quality}" ]]; then + quality="ebook" +fi + +gs -sDEVICE=pdfwrite \ + -dCompatibilityLevel=1.4 \ + -dPDFSETTINGS=/ebook \ + -dNOPAUSE \ + -dQUIET \ + -dBATCH \ + -sOutputFile="$2" \ + "$1"