pdfimpose.schema.saddle
¶
Saddle stitch (like in newpapers or magazines)
This schema is used in newspapers or magazines: the sheets are inserted into each other.
To use this schema (with –group=1, or without –group):
print your imposed PDF file, two-sided;
- if there is two source pages on each destination page:
fold all your sheets at once;
otherwise, separately fold each sheet of paper, and insert them into each other;
bind.
With option –group=3 (for instance), repeat the step above for every group of three sheets. You get several signatures, that you have to bind together to get a proper book.
- Example:
SaddleImpositor
¶
- class pdfimpose.schema.saddle.SaddleImpositor(last: int = 0, omargin: ~pdfimpose.schema.Margins | str | ~numbers.Real | ~decimal.Decimal = <factory>, mark: list[str] = <factory>, folds: str = None, imargin: float = 0, bind: str = 'left', group: int = 1, creep: ~typing.Callable[[int], float] = <function nocreep>)[source]¶
Perform imposition of source files, with the ‘saddle’ schema.
impose()
¶
- pdfimpose.schema.saddle.impose(files, output, *, folds=None, signature=None, size=None, imargin=0, omargin=0, mark=None, last=0, bind='left', creep=<function nocreep>, group=1)[source]¶
Perform imposition of source files into an output file, to be bound using “saddle stitch”.
- Parameters:
files (list[str]) – List of source files (as strings or
io.BytesIO
streams). If empty, reads from standard input.output (str) – List of output file.
omargin (float) – Output margin, in pt. Can also be a
Margins
object.imargin (float) – Input margin, in pt.
mark (list[str]) – List of marks to add. Only crop marks are supported (mark=[‘crop’]); everything else is silently ignored.
folds (str) – Sequence of folds, as a string of characters h and v.
size (str) – Size of the destination pages, as a string that is to be parsed by
papersize.parse_papersize()
. This option is incompatible with signature and folds.signature (tuple[int]) – Layout of source pages on output pages. For instance
(2, 3)
means: the printed sheets are to be cut in a matrix of 2 horizontal sheets per 3 vertical sheets. This option is incompatible with size and folds.bind (str) – Binding edge. Can be one of left, right, top, bottom.
creep (function) – Function that takes the number of sheets in argument, and return the space to be left between two adjacent pages.
last (int) – Number of last pages (of the source files) to keep at the end of the output document. If blank pages were to be added to the source files, they would be added before those last pages.
group (int) – Group sheets before folding them. See help of command line –group option for more information.