Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sticker PDF Maker

Turn PNG artwork into print-ready, kiss-cut sticker PDFs — CMYK, transparent, with an editable vector cut line.

License Python Color

Hand a print shop a folder of PNGs and you usually get back stickers with a white box around them, the wrong colours, and no cut line. Sticker PDF Maker turns each PNG into a single, press-ready PDF that just works: the artwork in CMYK, transparency preserved, and a real vector kiss-cut path the cutter can follow.

$ python make_sticker_pdfs.py stickers_raw/ stickersheets/
Building 14 per-sticker PDF(s)...
  bot.png: longest side 52.9 mm (effective 300 dpi)
  ✔ bot.pdf  (503x624px = 43x53mm, 1.0 MB)
  exchange.png: longest side 60.0 mm (effective 300 dpi)
  ✔ exchange.pdf  (708x531px = 60x45mm, 1.0 MB)
  ...

Features

  • Editable vector kiss-cut line — traces a smooth cut path around the artwork as a CutContour spot colour set to overprint, exactly how cutting machines expect it.
  • True CMYK — converts artwork through the Coated FOGRA27 profile so on-screen colour matches the press, no surprise colour shifts.
  • Real transparency — embeds a proper soft mask (SMask), so transparent areas stay transparent instead of becoming a white or black box in Illustrator.
  • Automatic chroma key — strips solid green-screen backgrounds from non-transparent PNGs, including edge spill cleanup.
  • Equal-area auto-sizing — scales every design to roughly the same inked area within a configurable size band, so a sheet of mixed designs looks consistent.
  • Resolution guard — flags any sticker whose effective resolution would drop below the printer's minimum before you send the file.
  • One PDF per sticker — pages are trimmed to the artwork's bounding box at native resolution. No wasted A3 sheets, no tiling.

Quick Start

Prerequisites
  • Python 3.9 or newer
  • The bundled CoatedFOGRA27.icc profile (ships with this repo, no setup needed)

All Python dependencies install from requirements.txt below.

# 1. Set up an isolated environment
python -m venv .venv
source .venv/bin/activate        # Windows: .venv\Scripts\activate

# 2. Install dependencies
pip install -r requirements.txt

# 3. Convert a folder of PNGs into per-sticker PDFs
python make_sticker_pdfs.py input_pngs/ output_pdfs/

The output directory is created if it doesn't exist. Every *.png in the input folder becomes a matching *.pdf in the output folder.


Usage

# Convert every PNG in a folder
python make_sticker_pdfs.py stickers_raw/ stickersheets/

# Show all options
python make_sticker_pdfs.py --help

Input expectations

  • Format: PNG. Either already-transparent (RGBA) artwork, or art on a solid green background — the chroma key handles the latter automatically.
  • Resolution: higher is better. Sizing assumes 300 dpi; the tool warns when a design would print below the 150 dpi floor.
  • Layout: one design per file. Filenames carry through (bot.png → bot.pdf).

What's in each PDF

Layer Detail
Artwork CMYK image, Coated FOGRA27, with a soft mask for transparency
Cut line Vector path in the CutContour spot colour, 100% tint, overprinting
Page Trimmed to the artwork bounding box plus a 2 mm transparent margin

Open a result in Illustrator and you'll see the sticker on a transparent page with a selectable magenta cut path. Send it to a kiss-cut print shop and the CutContour separation drives the cutter directly.


Configuration

Tunable parameters live in the CONFIG block at the top of make_sticker_pdfs.py:

Setting Default What it controls
DPI 300 Resolution used to size the PDF page in points
CUT_OFFSET_MM 0.4 How far outside the artwork edge the cut line sits
PAGE_MARGIN_MM 2.0 Transparent breathing room around the cut path
CLOSE_RADIUS_MM 1.0 Bridges zigzag valleys before tracing the contour
MIN_LONG_MM / MAX_LONG_MM 50 / 60 Size band for each sticker's longest side
TARGET_AREA_CM2 17.0 Target inked area used for equal-area sizing
MIN_EFFECTIVE_DPI 150 Printer's resolution floor; below this triggers a warning
CUT_SPOT_NAME CutContour Name of the spot colour separation (match your print shop's spec)
KEY_THRESHOLD / KEY_SOFTNESS 60 / 60 Green-screen chroma-key strength and edge softness

How It Works

Each PNG runs through a fixed pipeline:

  1. Chroma key — if the image isn't already transparent, remove the solid green background and clean up green spill on the edges.
  2. Trim — crop to the artwork's content bounding box.
  3. Size — scale to a target inked area, clamped to the size band, and flag the result if its effective resolution falls below the printer minimum.
  4. Trace the cut — close small concavities, offset outward, fit a smooth periodic spline, and retry with a wider offset until the path fully contains the artwork.
  5. Convert to CMYK — transform sRGB → Coated FOGRA27 with relative colorimetric intent, keeping the alpha channel as a separate mask.
  6. Assemble the PDF — write the CMYK image with its soft mask, define the CutContour Separation colour space, enable overprint, and stroke the cut path as vector.

Contributing

Issues and pull requests are welcome. The whole tool is a single, dependency-light Python file — start at make_sticker_pdfs.py and the CONFIG block.

When changing the imaging pipeline, verify the output opens cleanly in a PDF/vector editor and that the CutContour separation is present and overprinting.


License

Licensed under the Apache License 2.0.

This repository contains the tool only — no sticker artwork is included. Any PNGs you process and the PDFs you generate remain entirely yours; the license covers the code.

About

automatically generate sticker pdfs with ContourCut lines for printing from chroma keyed images

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages