Merge permissions now fixed
This commit is contained in:
parent
60c055141f
commit
5467114631
|
@ -2898,8 +2898,20 @@ let go () =
|
||||||
write_pdf false pdf
|
write_pdf false pdf
|
||||||
| _ ->
|
| _ ->
|
||||||
(* We check permissions. A merge is allowed if each file
|
(* We check permissions. A merge is allowed if each file
|
||||||
included was (a) not encrypted, or (b) decrypted using
|
included was (a) not encrypted (detected by the absence of
|
||||||
the owner password *)
|
saved encryption information in the PDF, or (b) decrypted using
|
||||||
|
the owner password (stored in the input) *)
|
||||||
|
if
|
||||||
|
not
|
||||||
|
(fold_left ( && ) true
|
||||||
|
(map2
|
||||||
|
(fun (_, _, _, _, _, was_dec_with_owner) pdf ->
|
||||||
|
!was_dec_with_owner || pdf.Pdf.saved_encryption = None)
|
||||||
|
inputs
|
||||||
|
pdfs))
|
||||||
|
then
|
||||||
|
soft_error "Merge requires the owner password for all encrypted files."
|
||||||
|
else
|
||||||
(* If args.keep_this_id is set, change the ID to the one from the kept one *)
|
(* If args.keep_this_id is set, change the ID to the one from the kept one *)
|
||||||
let rangenums = map2 parse_pagespec pdfs ranges in
|
let rangenums = map2 parse_pagespec pdfs ranges in
|
||||||
let outpdf =
|
let outpdf =
|
||||||
|
|
Loading…
Reference in New Issue