more inline functions

This commit is contained in:
John Whitington 2024-01-23 18:22:09 +00:00
parent e2590bb3d0
commit 787ae85eb9
1 changed files with 8 additions and 33 deletions

View File

@ -1555,19 +1555,10 @@ let setrevision n =
| [] ->
Pdfe.log "Warning. -revision ignored. Put it after the filename.\n"
let setoutline () =
args.outline <- true
let setlinewidth l =
args.linewidth <- l
let setimageresolution f =
detect_duplicate_op (ImageResolution f);
args.op <- Some (ImageResolution f)
let setgspath p =
args.path_to_ghostscript <- p
let setimpath p =
args.path_to_im <- p
@ -1591,24 +1582,9 @@ let settobox s =
let setmediaboxifmissing () =
args.mediabox_if_missing <- true
let setprerotate () =
args.prerotate <- true
let settopage s =
args.topage <- Some s
let setscalestamptofit () =
args.scale_stamp_to_fit <- true
let setremoveduplicatestreams () =
args.remove_duplicate_streams <- true
let setnopreserveobjstm () =
args.preserve_objstm <- false
let setcreateobjstm () =
args.create_objstm <- true
let setstdinuser u =
match args.inputs with
| (StdIn, x, _, o, f, g)::t -> args.inputs <- (StdIn, x, u, o, f, g)::t
@ -1780,7 +1756,6 @@ let addop o =
begin match args.op with Some Draw -> () | _ -> error "Need to be in drawing mode for this." end;
Cpdfdrawcontrol.addop o
let embed_font_inner font =
match font with
| StandardFont f ->
@ -2007,10 +1982,10 @@ and specs =
Arg.Unit (setop ChangeId),
" Change the file's /ID tag");
("-no-preserve-objstm",
Arg.Unit setnopreserveobjstm,
Arg.Unit (fun () -> args.preserve_objstm <- false),
" Don't preserve object streams");
("-create-objstm",
Arg.Unit setcreateobjstm,
Arg.Unit (fun () -> args.create_objstm <- true),
" Create object streams anew");
("-keep-version",
Arg.Unit setkeepversion,
@ -2109,7 +2084,7 @@ and specs =
Arg.Unit (setop Upright),
" Make pages upright");
("-prerotate",
Arg.Unit setprerotate,
Arg.Unit (fun () -> args.prerotate <- true),
" Calls -upright on pages before modifying them, if required");
("-no-warn-rotate",
Arg.Unit setnowarnrotate,
@ -2194,7 +2169,7 @@ and specs =
Arg.Unit (setop Compress),
" Compress streams, leaving metadata alone");
("-remove-duplicate-streams",
Arg.Unit setremoveduplicatestreams,
Arg.Unit (fun () -> args.remove_duplicate_streams <- true),
"");
("-list-bookmarks",
Arg.Unit (setop ListBookmarks),
@ -2242,7 +2217,7 @@ and specs =
Arg.String setstampunder,
" Stamp a file under some pages of another");
("-scale-stamp-to-fit",
Arg.Unit setscalestamptofit,
Arg.Unit (fun () -> args.scale_stamp_to_fit <- true),
" Scale the stamp to fit the page");
("-combine-pages",
Arg.String setcombinepages,
@ -2284,10 +2259,10 @@ and specs =
Arg.Float setopacity,
" Set the text opacity");
("-outline",
Arg.Unit setoutline,
Arg.Unit (fun () -> args.outline <- true),
" Use outline mode for text");
("-linewidth",
Arg.Float setlinewidth,
Arg.Float (fun f -> args.linewidth <- f),
" Set line width for outline text");
("-pos-center",
Arg.String setposcenter,
@ -2692,7 +2667,7 @@ and specs =
Arg.String setpostpend,
" Postpend content to page");
("-gs",
Arg.String setgspath,
Arg.String (fun s -> args.path_to_ghostscript <- s),
" Path to gs executable");
("-gs-malformed",
Arg.Unit setgsmalformed,