mirror of
				https://github.com/johnwhitington/cpdf-source.git
				synced 2025-06-05 22:09:39 +02:00 
			
		
		
		
	Permissions for -combine-pages
This commit is contained in:
		| @@ -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; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user