From 50e916091cd4e9e559e1a10d3b417993d62ba7e3 Mon Sep 17 00:00:00 2001 From: alterNERDtive Date: Thu, 4 Jul 2024 11:35:46 +0200 Subject: [PATCH] feat: shrink PDF size with ps2pdf --- scanmultipage | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scanmultipage b/scanmultipage index 53de990..bbe251d 100755 --- a/scanmultipage +++ b/scanmultipage @@ -103,8 +103,11 @@ done # concatenate scanned pages echo "Concatenating pages …" -convert "$_tmpdir/*.png" $_file +convert "$_tmpdir/*.png" "${_file}" +pushd $_tmpdir +ps2pdf -dPDFSETTINGS=/ebook "${_file}" +popd -( $_silent ) || $_viewer $_file >/dev/null 2>/dev/null +( $_silent ) || $_viewer "${_file}.pdf" >/dev/null 2>/dev/null _cleanup