Skip to main content

Lay out large print jobs as PDFs with alignment marks.

Project description

Takes an image, printed height or width (in mm) and page size then splits image across multiple pages with alignment marks and generates a PDF.

It is intended for printing projections exported as SVGs from Openscad.

For the image it supports anything that Pillow supports, as well as SVGs thanks to CairoSVG.

PDF generation is done by ReportLab.

$ lps -h
usage: lps [-h] (--width WIDTH | --height HEIGHT) [--page_size PAGE_SIZE]
           [--overlap OVERLAP] [--margins MARGINS] [--outfile OUTFILE]
           [--svg_start_scale SVG_START_SCALE]
           image_file

positional arguments:
  image_file            Image to parse

optional arguments:
  -h, --help            show this help message and exit
  --width WIDTH         Width of image in millimeters
  --height HEIGHT       Height of image in millimeters
  --page_size PAGE_SIZE
                        Page size, e.g. a3, a4
  --overlap OVERLAP     Print overlap in mm
  --margins MARGINS     Print margins in mm
  --outfile OUTFILE     Filename to save pdf to
  --svg_start_scale SVG_START_SCALE
                        When using SVG, this is the largest scale factor to
                        attempt to generate an image

$ lps --width 970 --page_size a3 --overlap 20 wrap.svg
Loading Image
Trying to generate raster image of svg at 3x scale
The image will not fit on a single page
Calculating crop list
This will require 3 pages
Chunking image
Generating PDF

Licensed under MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lps-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page