warning 39

This commit is contained in:
John Whitington 2024-02-27 15:57:31 +00:00
parent e7bdd33e2e
commit 7b43c87458
4 changed files with 5 additions and 5 deletions

View File

@ -924,7 +924,7 @@ let operation_allowed pdf banlist op =
if args.debugcrypt then Printf.printf "Permissions: %s\n" (getpermissions pdf); if args.debugcrypt then Printf.printf "Permissions: %s\n" (getpermissions pdf);
not (banned banlist op) not (banned banlist op)
let rec decrypt_if_necessary (_, _, user_pw, owner_pw, was_dec_with_owner, _) op pdf = let decrypt_if_necessary (_, _, user_pw, owner_pw, was_dec_with_owner, _) op pdf =
if args.debugcrypt then if args.debugcrypt then
begin match op with begin match op with
None -> flprint "decrypt_if_necessary: op = None\n" None -> flprint "decrypt_if_necessary: op = None\n"
@ -3286,7 +3286,7 @@ let rec split_max_search pdf s b p q =
then split_max_search pdf s b (half + 1) q then split_max_search pdf s b (half + 1) q
else split_max_search pdf s b p half else split_max_search pdf s b p half
let rec split_max enc original_filename ~squeeze output_spec s pdf = let split_max enc original_filename ~squeeze output_spec s pdf =
let outs = ref [] in let outs = ref [] in
let p = ref 1 in let p = ref 1 in
let endpage = Pdfpage.endpage pdf in let endpage = Pdfpage.endpage pdf in

View File

@ -136,7 +136,7 @@ let extract_images_inner ~raw ?path_to_p2p ?path_to_im encoding serial pdf resou
in in
iter2 (write_image ~raw ?path_to_p2p ?path_to_im pdf resources) names images iter2 (write_image ~raw ?path_to_p2p ?path_to_im pdf resources) names images
let rec extract_images_form_xobject ~raw ?path_to_p2p ?path_to_im encoding dedup dedup_per_page pdf serial stem pnum form = let extract_images_form_xobject ~raw ?path_to_p2p ?path_to_im encoding dedup dedup_per_page pdf serial stem pnum form =
let resources = let resources =
match Pdf.lookup_direct pdf "/Resources" form with match Pdf.lookup_direct pdf "/Resources" form with
Some (Pdf.Dictionary d) -> Pdf.Dictionary d Some (Pdf.Dictionary d) -> Pdf.Dictionary d

View File

@ -28,7 +28,7 @@ let removetext range pdf =
in in
Cpdfpage.process_pages (Pdfpage.ppstub removetext_page) pdf range Cpdfpage.process_pages (Pdfpage.ppstub removetext_page) pdf range
let rec remove_all_text_ops pdf resources content = let remove_all_text_ops pdf resources content =
let is_textop = function let is_textop = function
Pdfops.Op_Tj _ | Pdfops.Op_' _ | Pdfops.Op_'' _ | Pdfops.Op_TJ _ -> true Pdfops.Op_Tj _ | Pdfops.Op_' _ | Pdfops.Op_'' _ | Pdfops.Op_TJ _ -> true
| _ -> false | _ -> false

View File

@ -1,6 +1,6 @@
open Pdfutil open Pdfutil
let rec of_utf8_with_newlines fontpack fontsize t = let of_utf8_with_newlines fontpack fontsize t =
let items = ref [] in let items = ref [] in
let currfont = ref ~-1 in let currfont = ref ~-1 in
let codepoints = Pdftext.codepoints_of_utf8 t in let codepoints = Pdftext.codepoints_of_utf8 t in