Skip to main content

A thin wrapper around ReportLab designed to simplify PDF document creation.

Project description

PDFino

github-tests-badge github-mypy-badge codecov-badge pypi-badge pypi-versions license-badge

PDFino (/pəˈdɪfino/) is a Python library for generating PDF files. It is built on top of ReportLab, a powerful PDF generation library for Python. PDFino is designed to be simple and easy to use. It provides a high-level API for generating PDF files without having to deal with the low-level details of ReportLab.

Getting started 🌯

from pdfino import Document


doc = Document()
doc.h1("Hello World", options={"color": "blue", "margin_bottom": 30})
doc.p("Generate PDFs effortlessly with PDFino.")
doc.hr(height=2, options={"color": "#ffa500", "margins": (30, 100, 0, 100)})
data = doc.bytes

PDFino keeps things streamlined, but it won't replace all of ReportLab's powers. You can always add ReportLab flowables directly to your document if you need to.

from pdfino import Document
from reportlab.platypus import Paragraph


doc = Document()
doc.add(Paragraph("Hello World", doc.stylesheet["h1"]))
doc.save_as("hello_world.pdf")

For detailed usage, check out pdfino.readthedocs.io.

Run the tests 🧪

poetry run pytest --cov=pdfino --cov-report=term

Style guide 📖

Tab size is 4 spaces. Keep lines under 120 characters. Feeling iffy? Run ruff before you commit:

poetry run ruff format . && poetry run ruff check pdfino

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

pdfino-0.1.0.tar.gz (10.8 kB view hashes)

Uploaded Source

Built Distribution

pdfino-0.1.0-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

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