diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 50a5e5e..8ca4802 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1025,7 +1025,7 @@ let fixdashes s = let set_input_image f s = try let fh = open_in_bin s in - let pdf = Cpdfimage.image_of_input ?subformat:args.subformat ?title:args.title f (Pdfio.input_of_channel fh) in + let pdf = Cpdfimage.image_of_input ?subformat:args.subformat ?title:args.title ~process_struct_tree:args.process_struct_trees f (Pdfio.input_of_channel fh) in begin try close_in fh with _ -> () end; args.original_filename <- s; args.create_objstm <- true; diff --git a/cpdfimage.ml b/cpdfimage.ml index 0da8c9f..15a9e19 100644 --- a/cpdfimage.ml +++ b/cpdfimage.ml @@ -493,7 +493,7 @@ let obj_of_jbig2_data ?global data = in Pdf.Stream {contents = (Pdf.Dictionary d, Pdf.Got data)}, extra -let image_of_input ?subformat ?title fobj i = +let image_of_input ?subformat ?title ~process_struct_tree fobj i = let pdf, title = match subformat with | None -> Pdf.empty (), begin match title with Some x -> x | None -> "" end diff --git a/cpdfimage.mli b/cpdfimage.mli index fb50ca1..aa3f0f8 100644 --- a/cpdfimage.mli +++ b/cpdfimage.mli @@ -25,7 +25,7 @@ val process : path_to_jbig2enc:string -> path_to_convert:string -> int list -> Pdf.t -> unit (**/**) -val image_of_input : ?subformat:Cpdfua.subformat -> ?title:string -> (unit -> Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list) -> Pdfio.input -> Pdf.t +val image_of_input : ?subformat:Cpdfua.subformat -> ?title:string -> process_struct_tree:bool -> (unit -> Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list) -> Pdfio.input -> Pdf.t val obj_of_jpeg_data : Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list val obj_of_png_data : Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list val obj_of_jbig2_data : ?global:Pdfio.bytes -> Pdfio.bytes -> Pdf.pdfobject * (int * Pdf.pdfobject) list