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:

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] [--file FILE] [--number NUMBER]
                [--orientation {portrait,landscape}] [--start START]
                [--papersize PAPERSIZE] [--list LIST [LIST ...]]
                [--color COLOR] [--list-colors]

Named Arguments

--version

Show version

--file, -f

Destination file. Default is “dummy.pdf”. Use “–file=-” 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 option –list.

--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 option –list.

--list, -l

List of paper size and page count (optional), separated by a colon. The paper size format is the same as the argument of –papersize; the page count is a positive integer (possibly zero). For instance, “–list a4 a5:2 a6:0 10cmx100mm 10cmx100mm” will produce a file with one a4 page, two a5 pages, and two 10cmx100mm pages. Incompatible with options –papersize and –number.

--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.

Indices and tables