Welcome to dummypdf’s documentation!

This tool can produce dummy PDF files. They can be used to test software manipulating such PDF files.

The produced files contain:

  • a big page number;

  • a rectangle around the page, and a cross across the whole page.

The color, page format and number of pages can be configured.

Examples:

  • One page A4 paper: example1

    dummypdf A4

  • Six pages, a third of an A4 paper: example2

    dummypdf -n 6 -p 21cmx99mm

    or:

    dummypdf 21cmx99mm:6

  • A pdf with different page formats: different.pdf

    dummypdf A4 A5:landscapewest

Download and install

See the project main page, and changelog.

Usage

Here are the command line options for dummypdf.

Generate dummy PDF

usage: dummypdf [-h] [--version] [--output OUTPUT] [--number NUMBER]
                [--orientation {portrait,landscape}] [--start START]
                [--papersize PAPERSIZE] [--rotation ROTATION] [--color COLOR]
                [--list-colors]
                [list ...]

Positional Arguments

list

List of paper size and page format (optional), separated by a colon. - The paper size format is the same as the argument of –papersize. - The page format is case insensitive and can contain any of:

  • a positive integer (possibly zero): the number of such pages;

  • an orientation: portrait or landscape (or their first letter p or l);

  • a rotation: north, south, east, west (or their first letter n, s, e, w).

For instance, “a4 a5:2 10cmx100mm:landscape3west” will produce a file with one a4 page, two a5 pages, and three landscape, rotated west, 10cmx100mm pages.

Those positional arguments are incompatible with options –papersize, –orientation, –rotation, and –number.

Named Arguments

--version

Show version

--output, -o

Output file. Default is “dummy.pdf”. Use “–output=-” to pipe data to standard output.

Default: “dummy.pdf”

--number, -n

Number of pages. Can be 0 to generate a file with no pages. Incompatible with positional arguments.

--orientation, -O

Possible choices: portrait, landscape

Paper orientation. Default depends on the paper size.

--start, -s

Number of first page.

Default: 1

--papersize, -p

Paper size, as either a named size (e.g. “A4” or “letter”), or a couple of lengths (e.g. “21cmx29.7cm” or “7in 8in”…). Default value is A4. Incompatible with positional arguments.

--rotation, -r

Paper rotation, in degrees.

--color, -c

Color to use. Can be:

  • deterministic (default): a random color is used, but calls to dummypdf using the same arguments give the same color (note that calls with different version of this program may lead to different colors used).

  • random: a random color is used (different on each call).

  • RED,GREEN,BLUE: a RGB color, where RED, GREEN and BLUE are integers between 0 and 255.

  • named colors: Run “dummypdf –list-colors” for the list of available color names.

Default: “deterministic”

--list-colors

List named colors (to be used with option “–color”) and exits.

One can use either positional arguments (dummypdf A4:2) or explicit arguments (dummypdf –paper A4 –number 2). If the pages of the output PDF have different size, orientation, or rotation, only positional arguments can be used.

Indices and tables