From 018ef019d88d79532497e7f5e8560fa69bdedbef Mon Sep 17 00:00:00 2001 From: John Whitington Date: Sun, 20 Dec 2020 17:35:47 +0000 Subject: [PATCH] more --- cpdfcommand.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 7cd44e6..e656125 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2883,7 +2883,7 @@ let rec extract_images_form_xobject pdf serial stem pnum form = in (* Remove any already in !written. Add any remaining to !written, if !args.dedup or !args.dedup_page *) let images = keep (fun o -> Pdf.lookup_direct pdf "/Subtype" o = Some (Pdf.Name "/Image")) xobjects in - let images, already_written = List.partition (function Pdf.Indirect n -> mem n !written | _ -> false) images in + let already_written, images = List.partition (function Pdf.Indirect n -> mem n !written | _ -> false) images in written := (option_map (function Pdf.Indirect n -> Some n | _ -> None) images) @ !written; images in @@ -2907,7 +2907,7 @@ let extract_images pdf range stem = | _ -> [] in let images = keep (fun o -> Pdf.lookup_direct pdf "/Subtype" o = Some (Pdf.Name "/Image")) xobjects in - let images, already_written = List.partition (function Pdf.Indirect n -> mem n !written | _ -> false) images in + let already_written, images = List.partition (function Pdf.Indirect n -> mem n !written | _ -> false) images in written := (option_map (function Pdf.Indirect n -> Some n | _ -> None) images) @ !written; let forms = keep (fun o -> Pdf.lookup_direct pdf "/Subtype" o = Some (Pdf.Name "/Form")) xobjects in extract_images_inner serial pdf page.Pdfpage.resources stem pnum images;