Command-line tool¶
The package includes a command-line tool for PDF imposition, pdfimpose.
Usage¶
To impose a PDF file with a chosen schema, run:
pdfimpose SCHEMA foo.pdf
For example, to impose a PDF file using the saddle schema (like a magazine), run:
pdfimpose saddle foo.pdf
Each schema has different options. Use pdfimpose SCHEMA --help for more information.
Configuration file¶
pdfimpose apply can be used to store options in a configuration file:
pdfimpose apply [-h] [--schema SCHEMA] [CONF] [PDF ...]
CONFis a configuration file, in yaml format (see below);PDFis the file(s) to process;SCHEMAis the imposition schema to use.
Those three arguments are optional: pdfimpose apply is a valid command:
If
CONFis missing, a configuration file is searched:pdfimpose.cfgor.pdfimpose.cfg, in the current working directory;the same files, in the parent directory, or grand-parent directory, or…;
the same files, in
~/.config;the same files, in the home directory;
/etc/pdfimpose.cfg(depending on the operating system).
If
PDFis missing, it is read from the configuration file (sectiongeneral, optionfiles).If
SCHEMAis missing, it is read from the configuration file (sectiongeneral, optionschema).
For instance, calling pdfimpose apply foo.cfg, where foo.cfg contains:
[general]
schema = hardcover
files = foo.pdf bar.pdf
[hardcover]
imargin = 1cm
omargin = .5cm
is equivalent to the following command line:
pdfimpose hardcover --imargin 1cm --omargin .5cm foo.pdf bar.pdf