From 60b13ad3f7a1b597152d079b336fbbed75942998 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 6 Nov 2018 14:40:12 +0100 Subject: 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. --- include/mupdf/pdf/document.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index 7d2110b7..27e3d4f4 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -879,6 +879,7 @@ struct pdf_write_options_s int do_linear; /* Write linearised. */ int do_clean; /* Clean content streams. */ int do_sanitize; /* Sanitize content streams. */ + int do_decrypt; /* Save without decryption. */ int continue_on_error; /* If set, errors are (optionally) counted and writing continues. */ int *errors; /* Pointer to a place to store a count of errors */ }; -- cgit v1.2.3