diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2018-11-06 14:40:12 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2018-11-07 14:02:18 +0100 |
commit | 60b13ad3f7a1b597152d079b336fbbed75942998 (patch) | |
tree | 044d4c1fa08f815f8e2af98056eef430cc5bcd89 /source/tools/pdfclean.c | |
parent | 635b325a64d7a271bbb6a9507c2d85332aa4d028 (diff) | |
download | mupdf-60b13ad3f7a1b597152d079b336fbbed75942998.tar.xz |
Fix 700053: Add 'decrypt' option to pdf_save_document.
This option is exposed as the -D flag to mutool clean.
Allow saving a document without encryption.
The next step is to allow saving a document with new encryption, but this
may require a fair amount of rejigging since the PDF write code to keep
separate doc->crypt objects for decryption and encryption.
Diffstat (limited to 'source/tools/pdfclean.c')
-rw-r--r-- | source/tools/pdfclean.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/tools/pdfclean.c b/source/tools/pdfclean.c index 6d5a69be..0e7a464a 100644 --- a/source/tools/pdfclean.c +++ b/source/tools/pdfclean.c @@ -51,7 +51,7 @@ int pdfclean_main(int argc, char **argv) opts.continue_on_error = 1; opts.errors = &errors; - while ((c = fz_getopt(argc, argv, "adfgilp:scz")) != -1) + while ((c = fz_getopt(argc, argv, "adfgilp:sczD")) != -1) { switch (c) { @@ -66,6 +66,7 @@ int pdfclean_main(int argc, char **argv) case 'l': opts.do_linear += 1; break; case 'c': opts.do_clean += 1; break; case 's': opts.do_sanitize += 1; break; + case 'D': opts.do_decrypt += 1; break; default: usage(); break; } } |