Squeeze done

This commit is contained in:
John Whitington 2014-09-24 13:34:01 +01:00
parent 27a40e84b4
commit 309c8bc85a
1 changed files with 4 additions and 2 deletions

View File

@ -444,10 +444,12 @@ let banned banlist = function
| _ -> mem Pdfcrypt.NoEdit banlist | _ -> mem Pdfcrypt.NoEdit banlist
let operation_allowed banlist = function let operation_allowed banlist = function
| None -> true (* Merge *) (* changed to allow it *) | None -> flprint "no-op, allow\n"; true (* Merge *) (* changed to allow it *)
| Some op -> not (banned banlist op) | Some op -> flprint "checking...\n"; not (banned banlist op)
let rec decrypt_if_necessary (a, b, c, user_pw, owner_pw) op pdf = let rec decrypt_if_necessary (a, b, c, user_pw, owner_pw) op pdf =
Printf.printf "decrypt_if_necessary: args.op is %s\n"
(match args.op with None -> "None" | Some _ -> "Some");
if not (Pdfcrypt.is_encrypted pdf) then pdf else if not (Pdfcrypt.is_encrypted pdf) then pdf else
match Pdfcrypt.decrypt_pdf_owner owner_pw pdf with match Pdfcrypt.decrypt_pdf_owner owner_pw pdf with
| Some pdf -> pdf | Some pdf -> pdf