Skip to main content

Tiny PDF writer

Project description

https://img.shields.io/pypi/v/pdfje.svg?style=flat-square https://img.shields.io/pypi/l/pdfje.svg?style=flat-square https://img.shields.io/pypi/pyversions/pdfje.svg?style=flat-square https://img.shields.io/readthedocs/pdfje.svg?style=flat-square https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square

PDF·je [PDF·yuh] (noun) Dutch for ‘small PDF’

Tiny library for writing simple PDFs.

Currently under development. The API may change significantly until the 1.x release. Leave a ⭐️ on GitHub if you’re interested how this develops!

Why?

The most popular Python libraries for writing PDFs are quite old and inspired by Java and PHP. PDFje is a modern, Pythonic library with a more declarative API.

How does it work?

>>> from pdfje import Document, Page, Text
>>> Document([
...     Page([Text("Hello", at=(200, 700)), Text("World", at=(300, 670))]),
...     Page(),
...     Page([Text("This is the last page!", at=(300, 600))]),
... ]).to_path('hello.pdf')

See the docs for a complete overview.

Installation

It’s available on PyPI.

pip install pdfje

Development

  • Install dependencies with poetry install.

  • To write output files during tests, use pytest --output-path=<outpur-dir>

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

pdfje-0.2.0.tar.gz (11.0 kB view hashes)

Uploaded Source

Built Distribution

pdfje-0.2.0-py3-none-any.whl (12.0 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