DESCRIPTION
-----------
-Paperjam is a tool for transform PDF files. It can re-order pages, scale
+PaperJam is a tool for transform PDF files. It can re-order pages, scale
and rotate them, put multiple pages on a single sheet, draw cropmarks,
and many other tricks.
-Paperjam takes an input file, splits it to a list of pages, applies a sequence
+PaperJam takes an input file, splits it to a list of pages, applies a sequence
of commands on this list, and finally writes the results to an output file.
-For each page, Paperjam tracks two sets of dimensions: the width and height
+For each page, PaperJam tracks two sets of dimensions: the width and height
of the 'physical page' (paper), and the 'image box', which is a rectangle on the
physical page containing all useful contents. Initially, the physical
page is equal to the *CropBox* of the PDF page and the image box to its
GENERAL SYNTAX
--------------
-Paperjam takes a list of commands separated by spaces, like this:
+PaperJam takes a list of commands separated by spaces, like this:
paperjam 'common scaleto("a4") nup(2, hspace=5mm)' in.pdf out.pdf
satisfies the syntax of an identifier. In case of positional arguments,
the identifier must not match the name of any argument. Please avoid
using this shortcut in scripts, because they could be easily broken
- by parameters introduced in newer versions of Paperjam.
+ by parameters introduced in newer versions of PaperJam.
switches::
Boolean value: either 0 (false) or 1 (true). If only the name is given (with no value
The pipeline is enclosed in curly braces. It consists of one or more 'stages'
separated by commas. Each stage has one or more 'page selectors' (page numbers
or ranges) and an optional list of commands to apply on these pages (separated
-from the selectors by a semicolon).
+from the selectors by a colon).
When a range is written backwards (the first page number is greater than the
second one), the pages are processed in reverse order.
~~~~~~~~~~~~~
When a paper format is expected, it is given either by its width and height
(the corresponding arguments are usually called *w* and *h*), or by the standard
-name of the format (called *paper*). Paperjam currently uses the libpaper library
+name of the format (called *paper*). PaperJam currently uses the libpaper library
for parsing the names. You can call +paperconf -a+ to get the list of known names.
Margins
COMMANDS
--------
-Paperjam knows the following commands and arguments. Positional arguments
+PaperJam knows the following commands and arguments. Positional arguments
have their names enclosed in square brackets.
add-blank
command forms two temporary documents, concatenates them to the result of select, and finally applies
common.
+slice
+~~~~~
+Slices the image to several smaller pages. Each page receives a part of the original
+image, gluing the parts together produces the original image.
+
+*[paper=]*'string', *w=*'dimen', *h=*'dimen'::
+ Paper size of the produced pages (see Paper formats above).
+
+*pos=*'string'::
+ Position of the original image on a "canvas" obtained by gluing
+ together non-margin parts of the produced pages (see Positioning above).
+ Default: *cc*.
+
+*margin=*'dimen', *hmargin=*'dimen', *vmargin=*'dimen', *lmargin=*'dimen', *rmargin=*'dimen', *tmargin=*'dimen', *bmargin=*'dimen'::
+ Set margins of the produced pages (see Margins above). Defaults to 0.
+
+*bleed=*'dimen'::
+ Let the parts of the image bleed this far outside their boxes.
+
LICENSE
-------
-Paperjam was written by Martin Mares.
+PaperJam was written by Martin Mares.
It can be distributed and used under the terms of the GNU
General Public License version 2 or any later version.
HISTORY
-------
-I conceived the idea of a document processor like Paperjam when struggling with pre-press
+I conceived the idea of a document processor like PaperJam when struggling with pre-press
formatting in the early 2000's. At that time, the basic ideas behind the language were born,
but everything was deeply rooted in the then standard PostScript world. After some years,
I managed to convince a student of mine Ales Snuparek to implement my ideas as his bachelor's project.
In the 2010's, limitations of the old design became clear and many PDF documents were using
features not known to PsPdfTool (most prominently object streams). After several years of
-pondering, I became fond of the QPDF library and wrote Paperjam as a modern successor of
+pondering, I became fond of the QPDF library and wrote PaperJam as a modern successor of
PsPdfTool.