1man(1)                          pdfxup man page                         man(1)
2
3
4

NAME

6       pdfxup - n-up tool with reduced margins
7

SYNOPSIS

9       pdfxup [OPTIONS] [FILE]
10

DESCRIPTION

12       pdfxup  creates a PDF document where each page is obtained by combining
13       several pages of a PDF file given as output. The important  feature  of
14       pdfxup,  compared  to similar programs, is that it tries to compute the
15       (global) bounding box of the input PDF file, in  order  to  remove  the
16       margins  and to keep the text only. Instead of having the font size di‐
17       vided by 2 (for the case of 2-up output), in some case you may  end  up
18       with  almost  the same font size as in the original document (as is the
19       case for a default 'article' document produced by LaTeX).
20
21       pdfxup uses ghostscript for computing the maximal bounding box of (some
22       of)  the  pages  of the document, and then uses pdflatex (with graphicx
23       package) in order to produce the new document.
24

OPTIONS

26       pdfxup accepts numerous options. The most important ones are:
27
28       -x m, --columns m
29              sets the number of columns of the output file (default 2);
30
31       -y n, --rows n
32              sets the number of lines of the output file (default 1);
33
34       -nup mxn, --nup mxn
35              sets the number of rows and columns of the output file  (default
36              2x1);
37
38       -l (0|1), --landscape, --portrait
39              sets orientation of paper (of final document);
40
41       -cf file, --config  file, --mode  file
42              reads  file  (with  extension  .xup) and uses options defined in
43              that file (see below for details about .xup files).  All options
44              are  processed  in  the order the appear on the command-line, so
45              that it is possible to modify the options set in the  configura‐
46              tion file (and it is even possible to include several configura‐
47              tion files, the later one overwriting the  options  set  by  the
48              previous  ones).  Files are looked-up using kpsewhich (if avail‐
49              able).
50
51       -b (le|se), --booklet (le|se)
52              configure for printing as a booklet. Value 'le'  (which  is  the
53              default  value when -b is used with no argument) means that two-
54              sided printing is in 'long-edge' mode (you turn from one page to
55              the  next along the long edge of the paper). 'se' is the 'short-
56              edge' option.
57
58       -c, --clip, -nc, --no-clip
59              clip (or don't clip) pages to the computed bounding box. By  de‐
60              fault,  content is  clipped, to avoid overlap between neighbour‐
61              ing pages.  With --no-clip, anything outside  the  bounding  box
62              will be displayed.
63
64       -o file, --output file
65              name of output file.
66
67       -i     ask before overwriting output file.
68
69       -ow    overwrite output file without asking.
70
71       -ps s, --paper s
72              sets  paper size (default a4). The name must be known by package
73              geometry (more precisely, "<s>paper" should be defined  in  that
74              package).
75
76       -fw d, --framewidth d
77              width  of the frame around each page (default 0.4pt). Set to 0pt
78              to have no frame at all.
79
80       -tf [0|1], --tight-frame [0|1]
81              whether the frame should be tight around the page, leaving hori‐
82              zontal white space outside the frame, or should be wide and span
83              the whole available width.
84
85       -im d, --innermargins d
86              inner margin between frame and page (default 5pt).
87
88       -m d, --margins d
89              margin of pages of the new document (default 5pt).
90
91       -is d, --intspaces d
92              space between different pages (default 1pt).
93
94       -p list, --pages list
95              only consider sublist of pages of  input  document.  List  is  a
96              comma-separated list of pages or ranges pages of the form a-b; a
97              can be omitted to start from first page, and b can be omitted to
98              end  at  the last page. Therefore, "-p -" (which is the default)
99              includes all pages. Also allows modulo, so that "-p  0%2"  would
100              include only even-numbered pages.
101
102       -bb list, --bb list
103              only  consider  sublist of pages of input document for computing
104              bounding box.
105
106       -nobb list, --no-bb list
107              omit list of pages of input document from computation of  bound‐
108              ing box.
109
110       -g, --get-bb
111              only  compute  (and  output)  bounding box. Will not produce any
112              output file.
113
114       -kbb, --keep-bb
115              do not compute bounding box, preserve current margins.
116
117       -s x y W H, --set-bb x y W H
118              set the bounding box to the given values. Values are in pt;  the
119              first  two  elements  correspond to the lower left corner, while
120              the last two represent the width and height of the  part  to  be
121              displayed.
122
123       -w file, --watermark file
124              use  file  as  background  watermark. file can be any format ac‐
125              cepted by pdflatex (e.g. png or pdf). If file is a multipage PDF
126              file,  page  n  of the watermark file is used with page n of the
127              input file, and the last page of the watermark file is  repeated
128              if the input file has more pages.
129
130       -wp p, --watermark-period p
131              repeat  the  last  p pages of the watermark file instead of only
132              the last one.
133
134       -d, --debug
135              debug mode: keep intermediary files.
136
137       -col, --column-mode, --vertical
138              fill in pages top-down first (instead of  the  default  left-to-
139              right mode).  By default, pages are inserted from left to right,
140              until the line is full; with this  option,  pages  are  inserted
141              from  top  to  bottom, until the column is full. See option -bal
142              below for examples of both options.
143
144       -row, --row-mode, --horizontal
145              fill in pages left to right (which is the default mode).
146
147       -bal, --balance-last
148              balance last page: when using column mode, the pages are  filled
149              in from top to bottom, and the last page is no exception. Still,
150              it may be prefered that the columns in  the  last  page  remains
151              "balanced",  which  is what this option achieves. Symmetrically,
152              in row mode, this option would balance the rows.
153                               ---------                        ---------
154              row, no-balance | 1  2  3 |  column, no-balance  | 1  4  7 |
155              (default mode)  | 4  5  6 |                      | 2  5  8 |
156                              | 7  8  9 |                      | 3  6  9 |
157                               ---------                        ---------
158                               ---------                        ---------
159                              |10 11 12 |                      |10 13    |
160                              |13 14    |                      |11 14    |
161                              |         |                      |12       |
162                               ---------                        ---------
163
164                               ---------                        ---------
165                 row, balance | 1  2  3 |     column, balance  | 1  4  7 |
166                              | 4  5  6 |                      | 2  5  8 |
167                              | 7  8  9 |                      | 3  6  9 |
168                               ---------                        ---------
169                               ---------                        ---------
170                              |10 11    |                      |10 12 14 |
171                              |12 13    |                      |11 13    |
172                              |14       |                      |         |
173                               ---------                        ---------
174
175
176       -V [0-3], --verbose [0-3]
177              select verbosity (default: 1).
178
179       -q, --quiet
180              run quietly (equiv. '-V 0').
181
182       -v, --version
183              print version number and exit.
184
185       -h, --help
186              print help message and exit.
187

CONFIGURATION FILES

189       Configuration files (extension .xup) are bash scripts used to set  some
190       variables.  If  option  "--config-file <file>" (or equivalent) is used,
191       <file> is looked up with kpsewhich first, if it  contains  no  '/'.  If
192       kpsewhich  does not find it, then pdfxup checks if the file exists (us‐
193       ing 'test -e') before sourcing it (the PATH variable will not  be  used
194       to find it).
195
196       The  script  should only set some internal variables of pdfxup, such as
197       NB_ROWS, NB_COLUMNS, LANDSCAPE (to set up a predefined layout). It  can
198       be  used  to set the bounding box, but it is often better to compute it
199       on the first few pages of the document.   Here  are  some  examples  of
200       lines that can be put in a .xup file:
201
202       NB_COLUMNS=1
203              set the number of columns to 1
204
205       NB_ROWS=2
206              set the number of rows to 2
207
208       LANDSCAPE=0
209              set portrait mode
210
211       KEEP_ORIG_BBOX=1
212              do not crop margins
213
214       SET_BBOX="75 47 540 755"
215              set bounding box: lower left=(75,47); upper right=(540,755)
216
217       TIGHT_FRAME=1
218              set tight frames around pages
219
220       INNER_MARGINS=10pt
221              set margin around each page (inside the frame) to 10pt
222
223       INTERM_SPACES=10pt
224              set space between pages to 10pt
225
226       FRAME_WIDTH=2mm
227              set frame width to 2mm
228
229
230       Other  available  variables  can be found in the setdefaultvalues func‐
231       tion.
232
233

EXAMPLES

235       # pdfxup file.pdf
236              produces 2-up pdf file from file.pdf.
237
238       # pdfxup -bb 1-4 file.pdf
239              same behaviour, but computes the bounding  box  only  using  the
240              first 4 pages (this saves time when processing long documents).
241
242       # pdfxup -b -o booklet.pdf file.pdf
243              same behaviour, but creates a booklet (as booklet.pdf).
244
245       # pdfxup -kbb -x1 -y2 -l0 beamer-frames.pdf
246              arranges 2 beamer frames per page (not reducing margins).
247
248       # pdfxup --mode beamer2 beamer-frames.pdf
249              arranges PDF pages according to beamer2.xup configuration file.
250
251       # pdfxup -kbb -x2 -y2 -l beamer-frames.pdf:1-12,15-19
252              arranges  4  beamer  frames per page (not reducing margins), in‐
253              cluding only frames 1 to 12 and 15 to 19.
254

SEE ALSO

256       gs(1), pdflatex(1)
257

AUTHOR

259       Nicolas Markey (pdfxup@markey.fr)
260
261
262
2632.10                             25 april 2021                          man(1)
Impressum