Create PDF/UA-2
This commit is contained in:
parent
eeb64d48df
commit
c4b95c1eb6
|
@ -2627,7 +2627,10 @@ let specs =
|
|||
" Create a new PDF");
|
||||
("-create-pdf-ua-1",
|
||||
Arg.String (fun _ -> ()), (* Processed elsewhere *)
|
||||
" Create a new PDF/UA-1 with the new title");
|
||||
" Create a new PDF/UA-1 with the given title");
|
||||
("-create-pdf-ua-2",
|
||||
Arg.String (fun _ -> ()), (* Processed elsewhere *)
|
||||
" Create a new PDF/UA-2 with the given title");
|
||||
("-create-pdf-pages",
|
||||
Arg.Int setcreatepdfpages,
|
||||
" Number of pages for new PDF");
|
||||
|
@ -4621,6 +4624,7 @@ let expand_args argv =
|
|||
let rec expand_recipes = function
|
||||
| [] -> []
|
||||
| "-create-pdf-ua-1"::title::t -> Cpdfua.cpdfua_args title @ expand_recipes t
|
||||
| "-create-pdf-ua-2"::title::t -> Cpdfua.cpdfua2_args title @ expand_recipes t
|
||||
| h::t -> h::expand_recipes t
|
||||
|
||||
let expand_recipes argv =
|
||||
|
|
11
cpdfua.ml
11
cpdfua.ml
|
@ -1595,3 +1595,14 @@ let cpdfua_args title =
|
|||
"AND"; "-replace-obj"; "/Root/StructTreeRoot/Type={\"N\":\"/StructTreeRoot\"}";
|
||||
"AND"; "-set-version"; "7";
|
||||
"AND"; "-mark-as"; "PDF/UA-1"]
|
||||
|
||||
let cpdfua2_args title =
|
||||
[ "-create-pdf";
|
||||
"AND"; "-set-title"; title;
|
||||
"AND"; "-create-metadata";
|
||||
"AND"; "-set-language"; "en-US";
|
||||
"AND"; "-display-doc-title"; "true";
|
||||
"AND"; "-replace-obj"; "/Root/MarkInfo/Marked=true";
|
||||
"AND"; "-replace-obj"; "/Root/StructTreeRoot/Type={\"N\":\"/StructTreeRoot\"}";
|
||||
"AND"; "-set-version"; "10";
|
||||
"AND"; "-mark-as"; "PDF/UA-2"]
|
||||
|
|
|
@ -26,3 +26,4 @@ val replace_struct_tree : Pdf.t -> Cpdfyojson.Safe.t -> unit
|
|||
|
||||
(** / **)
|
||||
val cpdfua_args : string -> string list
|
||||
val cpdfua2_args : string -> string list
|
||||
|
|
Loading…
Reference in New Issue