Remove deprecated -control

This commit is contained in:
John Whitington 2024-09-02 14:00:11 +01:00
parent d576946270
commit 7128c23be3
3 changed files with 18 additions and 24 deletions

28
Changes
View File

@ -3,31 +3,35 @@
Fixes:
o Removed setting of Producer field in AGPL version
* Removed long-deprecated -control
* New -args-json for better control files
* = Supported by a grant from NLnet
2.7.1 (July 2024)
New features:
o Build PDF files from JPEG2000 (.jp2, .jpf/.jpx) files
o Mark a file as PDF/UA compliant, or remove such marking *
o Verify compliance to PDF/UA via the Matterhorn protocol *
o Extract, edit and reapply document structure tree *
o Print structure tree summary *
o Split structure tree when splitting PDF to save size *
o Combine structure trees when stamping PDFs *
o Set the natural language of a file *
* Mark a file as PDF/UA compliant, or remove such marking
* Verify compliance to PDF/UA via the Matterhorn protocol
* Extract, edit and reapply document structure tree
* Print structure tree summary
* Split structure tree when splitting PDF to save size
* Combine structure trees when stamping PDFs
* Set the natural language of a file
Extended features:
o Allow -obj to look up nested PDF information
o Merge structure trees better when merging files *
o Report top-level natural language on -info *
o Report mark information dictionary contents on -info *
* Merge structure trees better when merging files
* Report top-level natural language on -info
* Report mark information dictionary contents on -info
Backward-incompatible change:
o -process-struct-tree replaces -no-process-struct-tree
newly introduced in previous version *
* -process-struct-tree replaces -no-process-struct-tree
newly introduced in previous version
* = Supported by a grant from NLnet

View File

@ -1454,8 +1454,6 @@ let rec parse_chars args = function
let this, rest = getarg [] (h::t) in
parse_chars (this::args) rest
let control_args = ref []
let parse_control_file name =
(parse_chars []
(charlist_of_bytes (Pdfio.bytes_of_input_channel (open_in_bin name))))
@ -1857,11 +1855,7 @@ let setextractstreamdecomp s =
let setprintobj s =
args.op <- Some (PrintObj s)
(* Parse a control file, make an argv, and then make Arg parse it. *)
let rec make_control_argv_and_parse filename =
control_args := !control_args @ parse_control_file filename
and specs =
let specs =
[("-version",
Arg.Unit (setop Version),
" Print the cpdf version number");
@ -1958,9 +1952,6 @@ and specs =
("-fast",
Arg.Unit setfast,
" Speed over correctness with malformed documents");
("-control",
Arg.String make_control_argv_and_parse,
" Use a control file. Deprecated. Use -args.");
("-args",
Arg.Unit (fun () -> ()),
" Get arguments from a file.");
@ -4622,7 +4613,6 @@ let go_withargv argv =
Cpdfdrawcontrol.drawops := [("_MAIN", [])];
process_env_vars ();
parse_argv () s (align_specs specs) anon_fun usage_msg;
parse_argv () (Array.of_list ("cpdf"::!control_args)) (align_specs specs) anon_fun usage_msg;
let addrange pdf = AlreadyInMemory (pdf, "fromAND"), args.dashrange, "", "", ref false, None in
args.inputs <- rev (map addrange !output_pdfs) @ rev args.inputs;
output_pdfs := [];

View File

@ -1,4 +1,4 @@
%Document JPEG2000 embedding
%Document -control removal, -args-json addition
\documentclass{book}
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf,
% dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.