Adds -title

This commit is contained in:
John Whitington 2024-09-27 13:45:18 +01:00
parent bb7fa84ead
commit 95f35ad2a9
1 changed files with 9 additions and 3 deletions

View File

@ -552,7 +552,8 @@ type args =
mutable verify_single : string option; mutable verify_single : string option;
mutable draw_struct_tree : bool; mutable draw_struct_tree : bool;
mutable subformat : Cpdfua.subformat option; mutable subformat : Cpdfua.subformat option;
mutable indent : float option} mutable indent : float option;
mutable title : string option}
let args = let args =
{op = None; {op = None;
@ -690,7 +691,8 @@ let args =
verify_single = None; verify_single = None;
draw_struct_tree = false; draw_struct_tree = false;
subformat = None; subformat = None;
indent = None} indent = None;
title = None}
(* Do not reset original_filename or cpdflin or was_encrypted or (* Do not reset original_filename or cpdflin or was_encrypted or
was_decrypted_with_owner or recrypt or producer or creator or path_to_* or was_decrypted_with_owner or recrypt or producer or creator or path_to_* or
@ -816,7 +818,8 @@ let reset_arguments () =
args.verify_single <- None; args.verify_single <- None;
args.draw_struct_tree <- false; args.draw_struct_tree <- false;
args.subformat <- None; args.subformat <- None;
args.indent <- None args.indent <- None;
args.title <- None
(* Prefer a) the one given with -cpdflin b) a local cpdflin, c) otherwise assume (* Prefer a) the one given with -cpdflin b) a local cpdflin, c) otherwise assume
installed at a system place *) installed at a system place *)
@ -2825,6 +2828,9 @@ let specs =
("-subformat", ("-subformat",
Arg.String setsubformat, Arg.String setsubformat,
" Set subformat"); " Set subformat");
("-title",
Arg.String (fun s -> args.title <- Some s),
" Set PDF/UA title");
("-composition", ("-composition",
Arg.Unit (setop (Composition false)), Arg.Unit (setop (Composition false)),
" Show composition of PDF"); " Show composition of PDF");