summaryrefslogtreecommitdiff
path: root/apps/pdfclean.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/pdfclean.c')
-rw-r--r--apps/pdfclean.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/pdfclean.c b/apps/pdfclean.c
index 409d4fbb..e892db29 100644
--- a/apps/pdfclean.c
+++ b/apps/pdfclean.c
@@ -162,11 +162,14 @@ int pdfclean_main(int argc, char **argv)
int subset;
fz_write_options opts;
int write_failed = 0;
+ int errors = 0;
opts.do_garbage = 0;
opts.do_expand = 0;
opts.do_ascii = 0;
opts.do_linear = 0;
+ opts.continue_on_error = 1;
+ opts.errors = &errors;
while ((c = fz_getopt(argc, argv, "adfgilp:")) != -1)
{
@@ -229,5 +232,7 @@ int pdfclean_main(int argc, char **argv)
fz_free_context(ctx);
+ if (errors)
+ write_failed = 1;
return write_failed ? 1 : 0;
}