Skip to main content

Simple PDF Creator

Project description

Python PDF Generator

PdfPug is a simple Python PDF creator using easy to use APIs. It provides a variety of components and the ability to customise these components to suit different use cases.

Note: PdfPug is still very new and as such the APIs are not stable. It can be considered to be in pre-alpha stage!

Installation

$ pip install pdfpug

Usage

>>> from pdfpug import Header, Paragraph, PdfReport
>>> intro_header = Header('Introduction to PdfPug')
>>> para = Paragraph(
...     "Lorem Ipsum is <b>simply</b> <u>dummy</u> text of the printing and typesetting "
...     "industry. Lorem Ipsum has been the industry's standard dummy text "
...     "ever since the 1500s, when an unknown printer took a galley of type"
...     " and scrambled it to make a type specimen book. It has survived not "
...     "only five centuries, but also the leap into electronic typesetting, "
...     "remaining essentially unchanged. It was popularised in the 1960s with "
...     "the release of Letraset sheets containing Lorem Ipsum passages, and "
...     "more recently with desktop publishing software like Aldus PageMaker "
...     "including versions of Lorem Ipsum."
... )
>>> report = PdfReport()
>>> report.add_element(intro_header)
>>> report.add_element(para)
>>> report.generate_pdf('pdfpug-report.pdf')

Documentation

Documentation is available at https://pdfpug.readthedocs.io/en/latest/

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

pdfpug-0.1.0.tar.gz (8.8 kB view hashes)

Uploaded Source

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