This commit is contained in:
John Whitington 2021-10-12 18:40:47 +01:00
parent 3c3a847824
commit d11b6a97bb
2 changed files with 10 additions and 9 deletions

View File

@ -1,4 +1,4 @@
(* FIXME add -output-json-precombine-contents *) (*FIXME add -output-json-precombine-contents *)
(* cpdf command line tools *) (* cpdf command line tools *)
let demo = false let demo = false
let noncomp = false let noncomp = false
@ -1528,10 +1528,6 @@ let whingemalformed () =
prerr_string "Command line must be of exactly the form\ncpdf <infile> -gs <path> -gs-malformed-force -o <outfile>\n"; prerr_string "Command line must be of exactly the form\ncpdf <infile> -gs <path> -gs-malformed-force -o <outfile>\n";
exit 1 exit 1
let nothing () = ()
(* Parse a control file, make an argv, and then make Arg parse it. *) (* Parse a control file, make an argv, and then make Arg parse it. *)
let rec make_control_argv_and_parse filename = let rec make_control_argv_and_parse filename =
control_args := !control_args @ parse_control_file filename control_args := !control_args @ parse_control_file filename
@ -1613,7 +1609,7 @@ and specs =
Arg.String make_control_argv_and_parse, Arg.String make_control_argv_and_parse,
" Use a control file. Deprecated. Use -args."); " Use a control file. Deprecated. Use -args.");
("-args", ("-args",
Arg.Unit nothing, Arg.Unit (fun () -> ()),
" Get arguments from a file."); " Get arguments from a file.");
("-merge", ("-merge",
Arg.Unit (setop Merge), Arg.Unit (setop Merge),
@ -1711,9 +1707,6 @@ and specs =
("-remove-artbox", ("-remove-artbox",
Arg.Unit (setop RemoveArt), Arg.Unit (setop RemoveArt),
" Remove art box on specified pages"); " Remove art box on specified pages");
("-copy-cropbox-to-mediabox",
Arg.Unit (setop CopyCropBoxToMediaBox),
""); (* Undocumented now, since /frombox, /tobox now used *)
("-frombox", Arg.String setfrombox, " Set box to copy from"); ("-frombox", Arg.String setfrombox, " Set box to copy from");
("-tobox", Arg.String settobox, " Set box to copy to"); ("-tobox", Arg.String settobox, " Set box to copy to");
("-mediabox-if-missing", ("-mediabox-if-missing",
@ -1728,6 +1721,9 @@ and specs =
("-decrypt", ("-decrypt",
Arg.Unit (setop Decrypt), Arg.Unit (setop Decrypt),
" Decrypt a file"); " Decrypt a file");
("-decrypt-force",
Arg.Unit setdebugforce,
" Decrypt a file even without password");
("-no-edit", Arg.Unit set_no_edit, " No edits"); ("-no-edit", Arg.Unit set_no_edit, " No edits");
("-no-print", Arg.Unit set_no_print, " No printing"); ("-no-print", Arg.Unit set_no_print, " No printing");
("-no-copy", Arg.Unit set_no_copy, " No copying"); ("-no-copy", Arg.Unit set_no_copy, " No copying");
@ -2242,6 +2238,9 @@ and specs =
("-fix-prince", Arg.Unit (setop RemoveUnusedResources), ""); ("-fix-prince", Arg.Unit (setop RemoveUnusedResources), "");
("-extract-text", Arg.Unit (setop ExtractText), ""); ("-extract-text", Arg.Unit (setop ExtractText), "");
("-extract-text-font-size", Arg.Float setextracttextfontsize, ""); ("-extract-text-font-size", Arg.Float setextracttextfontsize, "");
("-copy-cropbox-to-mediabox",
Arg.Unit (setop CopyCropBoxToMediaBox),
""); (* Undocumented now, since /frombox, /tobox now used *)
] ]
and usage_msg = and usage_msg =

View File

@ -1,3 +1,5 @@
%Document -j to input JSON
%Document -decrypt-force
\documentclass{book} \documentclass{book}
% Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf etc. % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf etc.
\usepackage{comment}\excludecomment{cpdflib}\excludecomment{pycpdflib} \usepackage{comment}\excludecomment{cpdflib}\excludecomment{pycpdflib}