From a03b90a3b5c1571f56c843e6034e51b335acdcb9 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 30 Oct 2014 20:21:26 +0000 Subject: [PATCH] Regularising recryption --- cpdfcommand.ml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index e3715bd..0cb2bc5 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1944,10 +1944,12 @@ let really_write_pdf ?(encryption = None) ?(is_decompress=false) mk_id pdf outna match args.inputs with [] -> raise (Pdf.PDFError "no input in recryption") | (_, _, _, user_pw, _)::_ -> - Pdfwrite.pdf_to_file_recrypting + Pdfwrite.pdf_to_file_options ~preserve_objstm:args.preserve_objstm ~generate_objstm:args.create_objstm - pdf user_pw outname' + ~compress_objstm:(not is_decompress) + ~recrypt:(Some user_pw) + false None mk_id pdf outname' end else begin