Skip to main content

Convenience Python module for creating templated PDF documents

Project description

OzNetNerd PDF

Convenience Python module for creating templated PDF documents using Jinja2 and WeasyPrint.

Installation

pip3 install onnpdf

Usage

Pass a dictionary into onnpdf, and it will:

  1. Perform a "find and replace" operation
  2. Convert the template into a PDF document

Example dictionary as seen in code snippets:

kv_pairs = {
    'title': 'OzNetNerd.com Demo PDF',
    'author': 'Will Robinson',
    'job_title': 'DevOps Specialist',
    'company': 'OzNetNerd.com',
    'email': 'will@oznetnerd.com',
    'phone': '+61 00 000 000',
    'website': 'https://oznetnerd.com'
}

The above produces this PDF document.

Contact

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

onnpdf-0.0.1.tar.gz (1.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