mirror of
https://github.com/johnwhitington/cpdf-source.git
synced 2025-02-17 12:20:43 +01:00
Permissions for -combine-pages
This commit is contained in:
parent
c3683b3c0b
commit
29f663e85b
@ -586,6 +586,13 @@ let rec decrypt_if_necessary (_, _, _, user_pw, owner_pw, was_dec_with_owner) op
|
||||
| Some x -> Printf.printf "decrypt_if_necessary: op = %s\n" (string_of_op x)
|
||||
end;
|
||||
if not (Pdfcrypt.is_encrypted pdf) then pdf else
|
||||
match op with Some (CombinePages _) ->
|
||||
(* This is a hack because we don't have support for recryption on combine
|
||||
* pages. This is pervented by permissions above, but in the case that the
|
||||
* owner password is blank (e.g christmas_tree_lights.pdf), we would end
|
||||
* up here. *)
|
||||
soft_error "Combine pages: both files must be unencrypted for this operation."
|
||||
| _ ->
|
||||
match Pdfcrypt.decrypt_pdf_owner owner_pw pdf with
|
||||
| Some pdf ->
|
||||
args.was_decrypted_with_owner <- true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user