Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Repository
SVG + YAML = PDF
Basic Info
Statistics
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
- Releases: 19
Metadata Files
README.md
pdfbaker
Create PDF documents from YAML-configured SVG templates.
- Separation of design and content: Design your layout visually in SVG, while managing content and configuration in YAML.
- Instant templating: Turn any existing SVG into a configurable template with a single command.
Installation
pdfbaker is available on PyPI and can be installed using pipx:
bash
pipx install pdfbaker
If you don't have pipx yet, install it first:
bash
sudo apt install pipx
pipx ensurepath
Windows Requirements
If you are using Windows, GTK needs to be installed: GTK for Windows Runtime Environment Installer
- Choose Install GTK+ libraries
- Tick to setup path (otherwise add the install DLL folder manually)
- Choose your installation location
- Complete the installation
Optional Dependencies
bash
sudo apt install inkscape
- For PDF compression, install Ghostscript:
bash
sudo apt install ghostscript
- If your templates embed particular fonts, they need to be installed. For example for
Roboto fonts:
bash sudo apt install fonts-roboto
Quickstart: Create templated PDF from an SVG
The fastest way to get started is with the --create-from option:
- Design your document in an SVG editor or convert to SVG.
- Run pdfbaker with
--create-fromto scaffold a new project and generate your first PDF:
bash
pdfbaker --create-from mydesign.svg myproject/myproject.yaml
This will create a directory structure like:
bash
myproject
├── myproject.yaml
└── mydesign
├── config.yaml
├── pages
│ └── main.yaml
└── templates
└── main.svg.j2
and produce your PDF in myproject/dist/mydesign/mydesign.pdf.
Edit the template and YAML files to customize your content and variables. This directory structure is just a starting point. Add more documents and customize as needed.
For future builds, just run:
bash
pdfbaker myproject/myproject.yaml
to regenerate your PDFs.
Documentation
- Overview - Start here
- Usage - From the CLI or as a library
- Configuration Reference - All available settings
- Document Variants - Create multiple versions of the same document
- Custom Processing - Provide page content from anywhere
Examples
For working examples, see the examples directory:
- minimal - Basic usage
- regular - Standard features
- variants - Document variants
- custom_locations - Custom file/directory locations
- custom_processing - Custom processing with Python
Create all PDFs with:
bash
pdfbaker examples/examples.yaml
Development
All source code is on GitHub.
This project uses uv for dependency management. The
uv.lock file ensures reproducible builds.
Create and activate the virtual environment:
bash
uv venv
source .venv/bin/activate
Install development dependencies:
bash
uv sync --dev
Tests
Run tests:
bash
pytest
View test coverage:
bash
pytest --cov=pdfbaker --cov-report=term-missing
Pre-commit hook
If you want to commit changes, install pre-commit (maybe using uv) and run
bash
pre-commit install
This ensures the same checks run locally as in GitHub CI.
Owner
- Name: Python New Zealand
- Login: pythonnz
- Kind: organization
- Website: python.nz
- Repositories: 1
- Profile: https://github.com/pythonnz
Python New Zealand
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use pdfbaker in your work, please cite it using the following metadata."
title: "pdfbaker"
version: 0.11.0
date-released: 2025-05-23
repository-code: "https://github.com/pythonnz/pdfbaker"
license: "MIT"
authors:
- family-names: Adair
given-names: Danny
orcid: "https://orcid.org/0009-0004-8327-955X"
keywords:
- PDF
- SVG
- YAML
- CLI
- Python
GitHub Events
Total
- Create event: 22
- Release event: 18
- Issues event: 41
- Watch event: 1
- Delete event: 3
- Issue comment event: 48
- Push event: 211
- Public event: 1
- Pull request review event: 1
- Pull request event: 8
- Fork event: 2
Last Year
- Create event: 22
- Release event: 18
- Issues event: 41
- Watch event: 1
- Delete event: 3
- Issue comment event: 48
- Push event: 211
- Public event: 1
- Pull request review event: 1
- Pull request event: 8
- Fork event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 30
- Total pull requests: 6
- Average time to close issues: 7 days
- Average time to close pull requests: 1 day
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 1.4
- Average comments per pull request: 0.67
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 30
- Pull requests: 6
- Average time to close issues: 7 days
- Average time to close pull requests: 1 day
- Issue authors: 2
- Pull request authors: 2
- Average comments per issue: 1.4
- Average comments per pull request: 0.67
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- dannyadair (29)
- ben05allen (1)
Pull Request Authors
- dannyadair (3)
- ben05allen (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 84 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 33
- Total maintainers: 1
pypi.org: pdfbaker
SVG Jinja templates + YAML config = PDF documents
- Documentation: https://pdfbaker.readthedocs.io/
- License: mit
-
Latest release: 0.11.0
published 9 months ago