A thin wrapper around ReportLab designed to simplify PDF document creation.
Project description
PDFino
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pdfino-0.1.0.tar.gz
.
File metadata
- Download URL: pdfino-0.1.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.0 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74dc809a6f401169f8b2091e61d12445dcd406518c061e2926f74dc9ac68ba8d |
|
MD5 | e92ffdcf70d4ad739848d02cf7f6babf |
|
BLAKE2b-256 | 0f30d59669c9d93f9b2c464581a527b67215f5d0c3e12cabcaac86c54e754580 |
File details
Details for the file pdfino-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pdfino-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.0 CPython/3.12.0 Darwin/22.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dcfbc2fafb55edcf219f0bea2a86cf9c972108358e255344ed4be6be691017cd |
|
MD5 | d34e6f77e4e49bd4bc0cf469ea0b423b |
|
BLAKE2b-256 | a0e5025a48a524da86c926a8ca41ff8b423e56e98968fc8f01a3d9396f642bf3 |