more inline functions

This commit is contained in:
John Whitington 2024-01-23 18:09:15 +00:00
parent 88b3f96db1
commit 3059b6cb93
1 changed files with 10 additions and 40 deletions

View File

@ -1712,36 +1712,6 @@ let setcreatepdfpapersize s =
let w, h = Cpdfcoord.parse_coordinate (Pdf.empty ()) s in let w, h = Cpdfcoord.parse_coordinate (Pdf.empty ()) s in
Pdfpaper.make Pdfunits.PdfPoint w h Pdfpaper.make Pdfunits.PdfPoint w h
let setdraftremoveonly s =
args.removeonly <- Some s
let setgsquiet () =
args.gs_quiet <- true
let setjsonparsecontentstreams () =
args.jsonparsecontentstreams <- true
let setjsonnostreamdata () =
args.jsonnostreamdata <- true
let setjsondecompressstreams () =
args.jsondecompressstreams <- true
let setjsoncleanstrings () =
args.jsoncleanstrings <- true
let setocgrenamefrom s =
args.ocgrenamefrom <- s
let setocgrenameto s =
args.ocgrenameto <- s
let setsqueezepagedata () =
args.squeeze_pagedata <- false
let setsqueezerecompress () =
args.squeeze_recompress <- false
let set_dedup () = let set_dedup () =
args.dedup <- true args.dedup <- true
@ -2656,7 +2626,7 @@ and specs =
Arg.Unit (setop Draft), Arg.Unit (setop Draft),
" Remove images from the file"); " Remove images from the file");
("-draft-remove-only", ("-draft-remove-only",
Arg.String setdraftremoveonly, Arg.String (fun s -> args.removeonly <- Some s),
" Only remove named image"); " Only remove named image");
("-boxes", ("-boxes",
Arg.Unit setboxes, Arg.Unit setboxes,
@ -2758,7 +2728,7 @@ and specs =
Arg.Unit setgsmalformed, Arg.Unit setgsmalformed,
" Also try to reconstruct malformed files with gs"); " Also try to reconstruct malformed files with gs");
("-gs-quiet", ("-gs-quiet",
Arg.Unit setgsquiet, Arg.Unit (fun () -> args.gs_quiet <- true),
" Make gs go into quiet mode"); " Make gs go into quiet mode");
("-gs-malformed-force", ("-gs-malformed-force",
Arg.Unit whingemalformed, Arg.Unit whingemalformed,
@ -2830,25 +2800,25 @@ and specs =
Arg.String setsqueezelogto, Arg.String setsqueezelogto,
" Squeeze log location"); " Squeeze log location");
("-squeeze-no-pagedata", ("-squeeze-no-pagedata",
Arg.Unit setsqueezepagedata, Arg.Unit (fun () -> args.squeeze_pagedata <- false),
" Don't recompress pages"); " Don't recompress pages");
("-squeeze-no-recompress", ("-squeeze-no-recompress",
Arg.Unit setsqueezerecompress, Arg.Unit (fun () -> args.squeeze_recompress <- false),
" Don't recompress streams"); " Don't recompress streams");
("-output-json", ("-output-json",
Arg.Unit (setop OutputJSON), Arg.Unit (setop OutputJSON),
" Export PDF file as JSON data"); " Export PDF file as JSON data");
("-output-json-parse-content-streams", ("-output-json-parse-content-streams",
Arg.Unit setjsonparsecontentstreams, Arg.Unit (fun () -> args.jsonparsecontentstreams <- true),
" Parse content streams"); " Parse content streams");
("-output-json-no-stream-data", ("-output-json-no-stream-data",
Arg.Unit setjsonnostreamdata, Arg.Unit (fun () -> args.jsonnostreamdata <- true),
" Skip stream data for brevity"); " Skip stream data for brevity");
("-output-json-decompress-streams", ("-output-json-decompress-streams",
Arg.Unit setjsondecompressstreams, Arg.Unit (fun () -> args.jsondecompressstreams <- true),
" Skip stream data for brevity"); " Skip stream data for brevity");
("-output-json-clean-strings", ("-output-json-clean-strings",
Arg.Unit setjsoncleanstrings, Arg.Unit (fun () -> args.jsoncleanstrings <- true),
" Convert UTF16BE strings to PDFDocEncoding when possible"); " Convert UTF16BE strings to PDFDocEncoding when possible");
("-j", ("-j",
Arg.String set_json_input, Arg.String set_json_input,
@ -2860,10 +2830,10 @@ and specs =
Arg.Unit (setop OCGRename), Arg.Unit (setop OCGRename),
" Rename optional content group"); " Rename optional content group");
("-ocg-rename-from", ("-ocg-rename-from",
Arg.String setocgrenamefrom, Arg.String (fun s -> args.ocgrenamefrom <- s),
" Rename from (with -ocg-rename)"); " Rename from (with -ocg-rename)");
("-ocg-rename-to", ("-ocg-rename-to",
Arg.String setocgrenameto, Arg.String (fun s -> args.ocgrenameto <- s),
" Rename to (with -ocg-rename)"); " Rename to (with -ocg-rename)");
("-ocg-order-all", ("-ocg-order-all",
Arg.Unit (setop OCGOrderAll), Arg.Unit (setop OCGOrderAll),