cpdf -pad-before in.pdf [<range>] [-pad-with pad.pdf] -o out.pdf
cpdf -pad-after in.pdf [<range>] [-pad-with pad.pdf] -o out.pdf
cpdf -pad-every [<integer>] in.pdf [-pad-with pad.pdf] -o out.pdf
cpdf -pad-multiple [<integer>] in.pdf -o out.pdf
cpdf -pad-multiple-before [<integer>] in.pdf -o out.pdf
cpdf [-impose <pagesize> | impose-xy <x y>]
[-impose-columns] [-impose-rtl] [-impose-btt]
[-impose-margin <margin>] [-impose-spacing <spacing>]
[-impose-linewidth <width>] [-fast]
in.pdf -o out.pdf
cpdf -twoup-stack [-fast] in.pdf -o out.pdf
cpdf -twoup [-fast] in.pdf -o out.pdf
Sometimes, for instance to get a printing arrangement right, it’s useful to be able to insert blank pages into a PDF file. cpdf can add blank pages before a given page or pages, or after. The pages in question are specified by a range in the usual way:
cpdf -pad-before in.pdf 1 -o out.pdf
Add a blank page before page 1 (i.e. at the beginning of the document.)
cpdf -pad-after in.pdf 2,16,38,84,121,147 -o out.pdf
Add a blank page after pages 2, 16, 38, 84, 121 and 147 (for instance, to add a clean page between chapters of a document.)
The -pad-every n operation places a blank page after every n pages, excluding any last one. For example on a 9 page document this command adds a blank page after pages 3 and 6:
cpdf -pad-every 3 in.pdf -o out.pdf
Add a blank page after every three pages
In all three of these operations, one may specify -pad-with providing a (usually one-page) PDF file to be used instead of a blank page. For example, a page saying “This page left intentionally blank”.
The -pad-multiple n operation adds blank pages so the document has a multiple of n pages. For example:
cpdf -pad-multiple 8 in.pdf -o out.pdf
Add blank pages to in.pdf so it has a multiple of 8 pages.
The -pad-multiple-before n operation adds the padding pages at the beginning of the file instead.
Imposition is the act of putting two or more pages of an input document onto each page of the output document. There are two operations provided by cpdf:
cpdf -impose a0landscape in.pdf -o out.pdf
Impose as many pages as will fit on to new A0 landscape pages.
cpdf -impose-xy "3 4" in.pdf -o out.pdf
Impose 3 across and 4 down on to new pages of 3 times the width and 4 times the height of the input ones.
The x value for -impose-xy may be set to zero to indicate an infinitely-wide page; the y value to indicate an infinitely-long one. In both cases, the pages in the input file are assumed to be of the same dimensions.
The following options may be used to modify the output:
To impose with rotated pages, for example to put two A4 portrait pages two-up on an A3 landscape page, rotate them prior to imposition.
Two other ways of putting multiple pages on a single page remain from earlier versions of cpdf which lacked a general imposition operation. The -twoup-stack operation puts two logical pages on each physical page, rotating them 90 degrees to do so. The new mediabox is thus larger. The -twoup operation does the same, but scales the new sides down so that the media box is unchanged.
cpdf -twoup in.pdf -o out.pdf
Impose a document two-up, keeping the existing page size.
cpdf -twoup-stack in.pdf -o out.pdf
Impose a document two-up on a larger page by rotation.
NB: For all imposition options, see also discussion of -fast in Section 1.13.