From 87320f208228b2e2df156cc1f2d1cd54a333de3c Mon Sep 17 00:00:00 2001 From: John Whitington Date: Wed, 29 Nov 2023 10:33:07 +0000 Subject: [PATCH] Options for -chop --- cpdfchop.ml | 2 -- cpdfcommand.ml | 13 +++++++++++-- cpdfmanual.tex | 2 ++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cpdfchop.ml b/cpdfchop.ml index df3f8f1..40a2f3a 100644 --- a/cpdfchop.ml +++ b/cpdfchop.ml @@ -1,8 +1,6 @@ open Pdfutil open Cpdferror -(* 1. FIXME btt / rtl / columns *) - (* Chop a single page into pieces. We prefer the cropbox when available. We set mediabox only, and delete any other boxes. We delete /Annots, since duplicate annotations are not allowed. *) diff --git a/cpdfcommand.ml b/cpdfcommand.ml index 114ceca..896aa25 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -2314,10 +2314,10 @@ and specs = " Impose in columns rather than rows"); ("-impose-rtl", Arg.Unit setimposertl, - " Impose right-to-left on rows"); + " Impose right-to-left"); ("-impose-btt", Arg.Unit setimposebtt, - " Impose bottom-to-top on columns"); + " Impose bottom-to-top"); ("-impose-margin", Arg.Float setimposemargin, " Add margin around whole imposed page"); @@ -2330,6 +2330,15 @@ and specs = ("-chop", Arg.String setchop, " Chop x by y"); + ("-chop-columns", + Arg.Unit setimposecolumns, + " Chop in columns rather than rows"); + ("-chop-rtl", + Arg.Unit setimposertl, + " Chop right-to-left"); + ("-chop-btt", + Arg.Unit setimposebtt, + " Chop bottom-to-top"); ("-pad-before", Arg.Unit (setop PadBefore), " Add a blank page before the given pages"); diff --git a/cpdfmanual.tex b/cpdfmanual.tex index b8dd9d7..2961aab 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -5,6 +5,8 @@ %Document -list-images[-json], -list-image-uses[-json], -image-resolution-json %Document -raw for -extract-images %Add note to -fast about content sharing (with reference to -chop, but in general too) +%Document -chop +%Replace -impose-rtl etc with -rtl etc. \documentclass{book} % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf, % dotnetcpdflibmanual.pdf, jcpdflibmanual.pdf jscpdflibmanual.pdf etc.