pdfimpose.schema.copycutfold

Print pages, to be cut and folded, and eventually bound, to produce multiple books.

You want to print and bind several copies of a tiny A7 book. Those books are made with A6 sheets (when you open the book, you get two A7 pages side-by-side, which is A6). Since you can fit four A6 pages on an A4 page, this means that you can print four books at once.

To use this schema (without option –group):

  • print your imposed file, two-sided;

  • cut the stack of paper, to get several stacks (four in the example above);

  • fold (once) and bind each stack of paper you got, separately;

  • voilà! You now have several copies of your book.

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:

source, destination.

CopyCutFoldImpositor

class pdfimpose.schema.copycutfold.CopyCutFoldImpositor(last: int = 0, omargin: ~pdfimpose.schema.Margins | str | ~numbers.Real | ~decimal.Decimal = <factory>, mark: list[str] = <factory>, bind: str = 'left', creep: ~typing.Callable[[int], float] = <function nocreep>, imargin: str | ~numbers.Real | ~decimal.Decimal = 0, signature: tuple[int] = (0, 0), group: int = 0)[source]

Perform imposition of source files, with the ‘copycutfold’ schema.

impose()

pdfimpose.schema.copycutfold.impose(files, output, *, imargin=0, omargin=0, last=0, mark=None, signature=None, size=None, bind='left', creep=<function nocreep>, group=0)[source]

Perform imposition of source files into an output file, using the copy-cut-fold schema.

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|numbers.Real|decimal.Decimal|Margins) – Output margin. It can be: a numbers.Real or decimal.Decimal` (unit is pt), a Margins object, a str, to be parsed by papersize.parse_length().

  • imargin (float|numbers.Real|decimal.Decimal) – Input margin. Same types and meaning as omargin (excepted that Margins objects is not accepted).

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

  • mark (list[str]) – List of marks to add. Only crop marks are supported (mark=[‘crop’]); everything else is silently ignored.

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

  • size (str|tuple[float]) – Size of the output page. Signature is computed to fit the page. This option is incompatible with signature.

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

  • group (int) – Group sheets before cutting them. See help of command line –group option for more information.