This Python project converts a design described in a JSON file into a print-ready PDF. It supports both SVG vector graphics and raster images (e.g., PNG, JPG), placing them precisely at specified coordinates on a custom-sized canvas.
- JSON-based design configuration
- Embeds SVG vector graphics using
svglibandreportlabas true vector content - Supports PNG/JPG images with rotation
- Automatically sets the PDF page size based on
canvas_widthandcanvas_height - Outputs a final PDF with all assets positioned correctly
Install all required packages with:
python3 -m venv .venvsource .venv/bin/activatepip install PyMuPDF --only-binary=:all:pip install -r requirements.txtpython design-to-pdf-converter.py