From 4e91e9721a3b854071f284afb74b606d9b14fb3f Mon Sep 17 00:00:00 2001 From: John Whitington Date: Tue, 5 Dec 2023 12:56:56 +0000 Subject: [PATCH] JBIG2 global sharing finished --- cpdfcommand.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 3b32231..3ba78d2 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1794,7 +1794,8 @@ let set_input_jpeg s = set_input_image (fun () -> Cpdfimage.obj_of_jpeg_data) s let set_input_jbig2 s = set_input_image - (fun () -> Cpdfimage.obj_of_jbig2_data ?global:!jbig2_global) s + (fun () -> Cpdfimage.obj_of_jbig2_data ?global:!jbig2_global) s; + args.remove_duplicate_streams <- true let embed_font_inner font = match font with @@ -3477,6 +3478,7 @@ let go () = Pdfmerge.merge_pdfs args.retain_numbering args.remove_duplicate_fonts names pdfs rangenums in + if args.remove_duplicate_streams then Pdfmerge.remove_duplicate_fonts outpdf; (* JBIG2 Globals *) write_pdf false outpdf end | _ ->