Cut as flash cards (question on front, answer on back).

This schema can be used when you want to print flash cards:

  • your source PDF is a list of (let’s say) A6 pages: Question 1, Answer 1, Question 2, Answer 2, Question 3, Answer 3… Note that this behavior can be changed with option –back.

  • you want to print those questions and answer on an A4 sheet of paper, and cut it to get your flash cards (questions on front, answers on back).


source, destination.


class pdfimpose.schema.cards.CardsImpositor(last: int = 0, omargin: ~pdfimpose.schema.Margins | str | ~numbers.Real | ~decimal.Decimal = <factory>, mark: list[str] = <factory>, imargin: float = 0, signature: tuple[int] = (0, 0), back: str = '')[source]

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


pdfimpose.schema.cards.impose(files, output, *, imargin=0, omargin=0, mark=None, signature=None, size=None, back='')[source]

Perform imposition of source files into an output file, to be cut as flash cards.

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

  • signature (tuple[int]) – Layout of source pages on output pages. For instance, (2, 3) means that each output page will contain 2 columns and 3 rows of source pages. Incompatible with option size.

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

  • back (Optional[str]) – Back sides of cards. See –back help for more information.