-no-merge-struct-trees -> -no-process-struct-trees
This commit is contained in:
parent
15842dbd36
commit
019806ff63
|
@ -461,7 +461,7 @@ type args =
|
|||
mutable boxes : bool;
|
||||
mutable encrypt_metadata : bool;
|
||||
mutable retain_numbering : bool;
|
||||
mutable merge_struct_trees : bool;
|
||||
mutable process_struct_trees : bool;
|
||||
mutable remove_duplicate_fonts : bool;
|
||||
mutable remove_duplicate_streams : bool;
|
||||
mutable encoding : Cpdfmetadata.encoding;
|
||||
|
@ -596,7 +596,7 @@ let args =
|
|||
boxes = false;
|
||||
encrypt_metadata = true;
|
||||
retain_numbering = false;
|
||||
merge_struct_trees = true;
|
||||
process_struct_trees = true;
|
||||
remove_duplicate_fonts = false;
|
||||
remove_duplicate_streams = false;
|
||||
encoding = Cpdfmetadata.UTF8;
|
||||
|
@ -736,7 +736,7 @@ let reset_arguments () =
|
|||
args.boxes <- false;
|
||||
args.encrypt_metadata <- true;
|
||||
args.retain_numbering <- false;
|
||||
args.merge_struct_trees <- true;
|
||||
args.process_struct_trees <- true;
|
||||
args.remove_duplicate_fonts <- false;
|
||||
args.remove_duplicate_streams <- false;
|
||||
args.encoding <- Cpdfmetadata.UTF8;
|
||||
|
@ -2022,8 +2022,8 @@ let setextractstreamdecomp i =
|
|||
let setprintobj i =
|
||||
args.op <- Some (PrintObj i)
|
||||
|
||||
let setnomergestructtrees () =
|
||||
args.merge_struct_trees <- false
|
||||
let setnoprocessstructtrees () =
|
||||
args.process_struct_trees <- false
|
||||
|
||||
(* Parse a control file, make an argv, and then make Arg parse it. *)
|
||||
let rec make_control_argv_and_parse filename =
|
||||
|
@ -2141,9 +2141,9 @@ and specs =
|
|||
("-merge-add-bookmarks-use-titles",
|
||||
Arg.Unit setmergeaddbookmarksusetitles,
|
||||
" Use title of document rather than filename");
|
||||
("-no-merge-struct-trees",
|
||||
Arg.Unit setnomergestructtrees,
|
||||
" Do not merge structure trees");
|
||||
("-no-process-struct-trees",
|
||||
Arg.Unit setnoprocessstructtrees,
|
||||
" Do not process structure trees");
|
||||
("-remove-duplicate-fonts",
|
||||
Arg.Unit set_remove_duplicate_fonts,
|
||||
" Remove duplicate fonts when merging");
|
||||
|
@ -3598,12 +3598,7 @@ let extract_stream pdf decomp objnum =
|
|||
output_string stdout (Pdfio.string_of_bytes data)
|
||||
|
||||
let print_obj pdf objnum =
|
||||
let obj =
|
||||
if objnum = 0 then
|
||||
pdf.Pdf.trailerdict
|
||||
else
|
||||
Pdf.lookup_obj pdf objnum
|
||||
in
|
||||
let obj = if objnum = 0 then pdf.Pdf.trailerdict else Pdf.lookup_obj pdf objnum in
|
||||
Printf.printf "%S\n" (Pdfwrite.string_of_pdf obj)
|
||||
|
||||
(* Main function *)
|
||||
|
@ -3670,7 +3665,7 @@ let go () =
|
|||
in
|
||||
let outpdf =
|
||||
Pdfmerge.merge_pdfs
|
||||
args.retain_numbering args.remove_duplicate_fonts ~struct_hierarchy:args.merge_struct_trees names pdfs rangenums
|
||||
args.retain_numbering args.remove_duplicate_fonts ~struct_hierarchy:args.process_struct_trees names pdfs rangenums
|
||||
in
|
||||
if args.remove_duplicate_streams then Pdfmerge.remove_duplicate_fonts outpdf; (* JBIG2 Globals *)
|
||||
write_pdf false outpdf
|
||||
|
|
Loading…
Reference in New Issue