More inline functions
This commit is contained in:
parent
3059b6cb93
commit
e2590bb3d0
|
@ -1712,27 +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 set_dedup () =
|
|
||||||
args.dedup <- true
|
|
||||||
|
|
||||||
let set_dedup_per_page () =
|
|
||||||
args.dedup_per_page <- true
|
|
||||||
|
|
||||||
let setcollate () =
|
|
||||||
args.collate <- true
|
|
||||||
|
|
||||||
let setimposecolumns () =
|
|
||||||
args.impose_columns <- true
|
|
||||||
|
|
||||||
let setimposertl () =
|
|
||||||
args.impose_rtl <- true
|
|
||||||
|
|
||||||
let setimposebtt () =
|
|
||||||
args.impose_btt <- true
|
|
||||||
|
|
||||||
let setimposecenter () =
|
|
||||||
args.impose_center <- true
|
|
||||||
|
|
||||||
let setimpose s =
|
let setimpose s =
|
||||||
setop (Impose true) ();
|
setop (Impose true) ();
|
||||||
args.coord <- s
|
args.coord <- s
|
||||||
|
@ -1741,15 +1720,6 @@ let setimposexy s =
|
||||||
setop (Impose false) ();
|
setop (Impose false) ();
|
||||||
args.coord <- s
|
args.coord <- s
|
||||||
|
|
||||||
let setimposemargin f =
|
|
||||||
args.impose_margin <- f
|
|
||||||
|
|
||||||
let setimposespacing f =
|
|
||||||
args.impose_spacing <- f
|
|
||||||
|
|
||||||
let setimposelinewidth f =
|
|
||||||
args.impose_linewidth <- f
|
|
||||||
|
|
||||||
let setchop s =
|
let setchop s =
|
||||||
let x, y = Cpdfcoord.parse_coordinate empty s in
|
let x, y = Cpdfcoord.parse_coordinate empty s in
|
||||||
setop (Chop (int_of_float x, int_of_float y)) ()
|
setop (Chop (int_of_float x, int_of_float y)) ()
|
||||||
|
@ -2028,7 +1998,7 @@ and specs =
|
||||||
Arg.String setrange,
|
Arg.String setrange,
|
||||||
" Explicitly add a range");
|
" Explicitly add a range");
|
||||||
("-collate",
|
("-collate",
|
||||||
Arg.Unit setcollate,
|
Arg.Unit (fun () -> args.collate <- true),
|
||||||
" Collate ranges when merging");
|
" Collate ranges when merging");
|
||||||
("-revision",
|
("-revision",
|
||||||
Arg.Int setrevision,
|
Arg.Int setrevision,
|
||||||
|
@ -2401,34 +2371,34 @@ and specs =
|
||||||
Arg.String setimposexy,
|
Arg.String setimposexy,
|
||||||
" Impose x by y (zero means unlimited)");
|
" Impose x by y (zero means unlimited)");
|
||||||
("-impose-columns",
|
("-impose-columns",
|
||||||
Arg.Unit setimposecolumns,
|
Arg.Unit (fun () -> args.impose_columns <- true),
|
||||||
" Impose in columns rather than rows");
|
" Impose in columns rather than rows");
|
||||||
("-impose-rtl",
|
("-impose-rtl",
|
||||||
Arg.Unit setimposertl,
|
Arg.Unit (fun () -> args.impose_rtl <- true),
|
||||||
" Impose right-to-left");
|
" Impose right-to-left");
|
||||||
("-impose-btt",
|
("-impose-btt",
|
||||||
Arg.Unit setimposebtt,
|
Arg.Unit (fun () -> args.impose_btt <- true),
|
||||||
" Impose bottom-to-top");
|
" Impose bottom-to-top");
|
||||||
("-impose-margin",
|
("-impose-margin",
|
||||||
Arg.Float setimposemargin,
|
Arg.Float (fun f -> args.impose_margin <- f),
|
||||||
" Add margin around whole imposed page");
|
" Add margin around whole imposed page");
|
||||||
("-impose-spacing",
|
("-impose-spacing",
|
||||||
Arg.Float setimposespacing,
|
Arg.Float (fun f -> args.impose_spacing <- f),
|
||||||
" Add spacing around each imposed page");
|
" Add spacing around each imposed page");
|
||||||
("-impose-linewidth",
|
("-impose-linewidth",
|
||||||
Arg.Float setimposelinewidth,
|
Arg.Float (fun f -> args.impose_linewidth <- f),
|
||||||
" Imposition divider line width (0=none)");
|
" Imposition divider line width (0=none)");
|
||||||
("-chop",
|
("-chop",
|
||||||
Arg.String setchop,
|
Arg.String setchop,
|
||||||
" Chop x by y");
|
" Chop x by y");
|
||||||
("-chop-columns",
|
("-chop-columns",
|
||||||
Arg.Unit setimposecolumns,
|
Arg.Unit (fun () -> args.impose_columns <- true),
|
||||||
" Chop in columns rather than rows");
|
" Chop in columns rather than rows");
|
||||||
("-chop-rtl",
|
("-chop-rtl",
|
||||||
Arg.Unit setimposertl,
|
Arg.Unit (fun () -> args.impose_rtl <- true),
|
||||||
" Chop right-to-left");
|
" Chop right-to-left");
|
||||||
("-chop-btt",
|
("-chop-btt",
|
||||||
Arg.Unit setimposebtt,
|
Arg.Unit (fun () -> args.impose_btt <- true),
|
||||||
" Chop bottom-to-top");
|
" Chop bottom-to-top");
|
||||||
("-pad-before",
|
("-pad-before",
|
||||||
Arg.Unit (setop PadBefore),
|
Arg.Unit (setop PadBefore),
|
||||||
|
@ -2743,10 +2713,10 @@ and specs =
|
||||||
Arg.Unit (setop ExtractImages),
|
Arg.Unit (setop ExtractImages),
|
||||||
" Extract images to file");
|
" Extract images to file");
|
||||||
("-dedup",
|
("-dedup",
|
||||||
Arg.Unit set_dedup,
|
Arg.Unit (fun () -> args.dedup <- true),
|
||||||
" Deduplicate extracted images fully");
|
" Deduplicate extracted images fully");
|
||||||
("-dedup-perpage",
|
("-dedup-perpage",
|
||||||
Arg.Unit set_dedup_per_page,
|
Arg.Unit (fun () -> args.dedup_per_page <- true),
|
||||||
" Deduplicate extracted images per page only");
|
" Deduplicate extracted images per page only");
|
||||||
("-process-images",
|
("-process-images",
|
||||||
Arg.Unit (setop ProcessImages),
|
Arg.Unit (setop ProcessImages),
|
||||||
|
|
Loading…
Reference in New Issue