Impose multiple copies of a pdf onto a larger document.
Project description
Cardimpose
Cardimpose is a Python library that makes it easy to arrange multiple copies of a PDF on a larger document, perfect for scenarios like printing business cards. The library lets you customize your layout while adding crop marks and comes with a handy command line tool.
Example
Lets say you have a buisness card named card.pdf
:
With the cardimpose
command line tool, it is easy to print multiple copies of this card onto a larger sheet while adding crop marks:
$ cardimpose card.pdf
By default, the cards a placed side by side on an A4 sheet, filling up the entire document:
However, it is possible to tweak the layout. In the following example, we add a 5mm gap between the cards:
$ cardimpose --gutter 5mm card.pdf
The example card actually has a 4mm bleed around the edges.
When informing cardimpose
, it positions the cut marks accordingly:
$ cardimpose --gutter 5mm --bleed 4mm card.pdf
It is also possible to explicitly set the number of rows and columns:
$ cardimpose --gutter 5mmx10mm --bleed 4mm --nup 2x2 --rotate-page card.pdf
Customize the paper size, remove inner cut marks, and more:
$ cardimpose --gutter 5mm --bleed 4mm --page-size A3 --no-inner-cut-marks card.pdf
Installation
Install cardimpose
using pip:
pip install cardimpose
Settings
Specifying Pages
Cardimpose generates one complete output page per selected input page.
By default, every input page is selected.
To control which input pages produce outputs, use the --pages
argument.
This argument supports various options:
- Use
.
to include all pages. - Specify single page numbers. Negative page numbers are caculated from the back of the document.
- Define page ranges using hyphens.
- Combine multiple page selections with commas.
For instance, using the command --pages 1,4-6
will impose pages 1,4,5 and 6 of the input document, generating one imposed output page for each selected input page.
Other command line options apply to all input pages. To specify different bleeds, margins and gutters for different pages, split the input file into different pdf files and impose them separately.
Specifying Lengths
Lengths are given by a number with a unit.
Currently, supported units are mm
, cm
, in
and px
.
The arguments --margin
, --bleed
and --gutter
can also receive separate horizontal and vertical lengths, combined by an x
.
Setting --margin 1cmx2cm
, sets the left and right margin to 1cm and the top and bottom margin to 2cm.
A single length for these arguments sets both directions to the same value.
Crop Marks
By default cut marks are inserted around each imposed card.
The distance, length and thickness can be set through command line arguments (see cardimpose --help
).
Additionally, it is possible to completely disable cutmarks or to hide the cutmarks in the middle of the imposed cards.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cardimpose-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58431c1e6a5da40d91ed2e6657663083873e43cdbd091d11cda5bb1eae07f7a1 |
|
MD5 | 8066abaa9c1039e755f245f8ce73b91b |
|
BLAKE2b-256 | 30cca7b5a287873ecadde777b6f7aaff3e19a263874674a0cc1118824008be8f |