Reversr -no-process-struct-tree

This commit is contained in:
John Whitington 2024-07-03 12:53:14 +01:00
parent 12fd417f98
commit 70827ba607
3 changed files with 13 additions and 11 deletions

View File

@ -594,7 +594,7 @@ let args =
boxes = false;
encrypt_metadata = true;
retain_numbering = false;
process_struct_trees = true;
process_struct_trees = false;
remove_duplicate_fonts = false;
remove_duplicate_streams = false;
encoding = Cpdfmetadata.Stripped;
@ -733,7 +733,7 @@ let reset_arguments () =
args.boxes <- false;
args.encrypt_metadata <- true;
args.retain_numbering <- false;
args.process_struct_trees <- true;
args.process_struct_trees <- false;
args.remove_duplicate_fonts <- false;
args.remove_duplicate_streams <- false;
args.encoding <- Cpdfmetadata.Stripped;
@ -1975,9 +1975,9 @@ and specs =
("-merge-add-bookmarks-use-titles",
Arg.Unit setmergeaddbookmarksusetitles,
" Use title of document rather than filename");
("-no-process-struct-trees",
Arg.Unit (fun () -> args.process_struct_trees <- false),
" Do not process structure trees");
("-process-struct-trees",
Arg.Unit (fun () -> args.process_struct_trees <- true),
" Process structure trees");
("-remove-duplicate-fonts",
Arg.Unit set_remove_duplicate_fonts,
" Remove duplicate fonts when merging");

Binary file not shown.

View File

@ -1206,20 +1206,22 @@ In modern usage, \texttt{-utf8} is almost always the sensible option. But for hi
cpdf -merge in1.pdf [<range>] in2.pdf [<range>] [<more names/ranges>]
[-collate] [-retain-numbering] [-remove-duplicate-fonts]
[-merge-add-bookmarks [-merge-add-bookmarks-use-titles]]
[-no-process-struct-trees]
[-process-struct-trees]
-o out.pdf\end{verbatim}
\vspace{1.5mm}
\noindent\verb!cpdf -split in.pdf -o <format> [-chunk <chunksize>]!
\noindent\verb!cpdf -split in.pdf [-chunk <chunksize>] [-process-struct-trees]!\\
\noindent\verb! -o <format>!
\vspace{1.5mm}
\noindent\verb!cpdf -split-bookmarks <level> in.pdf [-utf8] -o <format>!
\noindent\verb!cpdf -split-bookmarks <level> in.pdf [-utf8] [-process-struct-trees]!\\
\noindent\verb! -o <format>!
\vspace{1.5mm}
\noindent\verb!cpdf -split-max <file size> in.pdf -o <format>!
\noindent\verb!cpdf -split-max <file size> in.pdf [-process-struct-trees] -o <format>!
\vspace{1.5mm}
\noindent\verb!cpdf -spray in.pdf -o a.pdf [-o b.pdf [-o ...]]!
\noindent\verb!cpdf -spray in.pdf [-process-struct-trees] -o a.pdf [-o b.pdf [-o ...]]!
\end{framed}
\vspace{12mm}
@ -1259,7 +1261,7 @@ of the inputs only appear once in the output.
The \texttt{-merge-add-bookmarks} option adds a top-level bookmark for each file, using the filename. Any existing bookmarks are retained. The \texttt{-merge\--add\--bookmarks\--use\--titles}, when used in conjunction with \texttt{-merge-add-bookmarks}, will use the title from each PDF's metadata instead of the filename.
The \texttt{-no-process-struct-tree} option prevents processing of structure trees. Instead of merging them, they are simply copied across wholesale. This can be useful with \texttt{-collate} which can presently cause an increased size. Or, to simply save time when a merged structure tree is not required.
The \texttt{-process-struct-trees} option will merge structure trees. Without this option, instead of merging them, they are simply copied across wholesale.
\section{Splitting}
\index{splitting}