diff options
Diffstat (limited to 'private_dot_local/bin/executable_compresspdf')
| -rw-r--r-- | private_dot_local/bin/executable_compresspdf | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/private_dot_local/bin/executable_compresspdf b/private_dot_local/bin/executable_compresspdf new file mode 100644 index 0000000..c79da7e --- /dev/null +++ b/private_dot_local/bin/executable_compresspdf @@ -0,0 +1,8 @@ +#!/bin/sh + +file="${1}" +ext="${file##*.}" +base="${file%.*}" + +[ "${ext}" = "pdf" ] || exit +gs -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="${base}-compressed${ext}" "${file}" |