From 04353276f3d8ebc2cd2e47157ede3757f3d2a72d Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 15 Nov 2023 17:34:14 +0000 Subject: [PATCH] Finish skeleton for -chop --- cpdfcommand.ml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 87c11f3..778ca84 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -1716,6 +1716,10 @@ let setimposespacing f = let setimposelinewidth f = args.impose_linewidth <- f +let setchop s = + let x, y = Cpdfcoord.parse_coordinate empty s in + setop (Chop (int_of_float x, int_of_float y)) () + let setreplacedictentry s = setop (ReplaceDictEntry s) () @@ -2323,6 +2327,9 @@ and specs = ("-impose-linewidth", Arg.Float setimposelinewidth, " Imposition divider line width (0=none)"); + ("-chop", + Arg.String setchop, + " Chop x by y"); ("-pad-before", Arg.Unit (setop PadBefore), " Add a blank page before the given pages");