From 191d91a1a86f8271bea742c507c521bfc1a42507 Mon Sep 17 00:00:00 2001 From: Dan Church Date: Tue, 29 Jun 2021 13:42:54 -0500 Subject: [PATCH] Add support for ignoring errors --- optipdf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/optipdf b/optipdf index 2468a64..859bbda 100755 --- a/optipdf +++ b/optipdf @@ -4,6 +4,7 @@ PRESERVE_TIMESTAMP=0 LOSSY=0 KEEP_BACKUP_SUFFIX=.old-unoptimized +FORCE=0 TEMP_FILES=() cleanup() { @@ -140,6 +141,11 @@ if [[ $LOSSY -ne 0 ]]; then --optimize-images ) fi +if [[ $FORCE -ne 0 ]]; then + QPDF_ARGS+=( + --warning-exit-0 + ) +fi ERRORS=0 FREED_TOTAL=0