From 9037ce25a5a58f4541f342cdeb389629786e5840 Mon Sep 17 00:00:00 2001 From: John Whitington Date: Thu, 30 Oct 2014 17:00:00 +0000 Subject: [PATCH] Recrypting work --- cpdfcommand.ml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 6f7ca58..286c589 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1941,8 +1941,9 @@ let really_write_pdf ?(encryption = None) ?(is_decompress=false) mk_id pdf outna if args.recrypt && args.was_encrypted then begin if args.debugcrypt then Printf.printf "Recrypting in really_write_pdf\n"; - Pdfwrite.pdf_to_file_recrypting - (get_single_pdf_nodecrypt false) pdf args.user outname' + match args.inputs with + [] -> raise (Pdf.PDFError "no input in recryption") + | (_, _, _, user_pw, _)::_ -> Pdfwrite.pdf_to_file_recrypting pdf user_pw outname' end else begin