Skip to content

Uses PySide / PyQt4 (will add support) for creating PDF's using Jinja2 templating

License

Notifications You must be signed in to change notification settings

jepayne1138/QtPDFPrinter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QtPDF Printer

Uses PySide / PyQt4 (will add support) for creating PDF's using Jinja2 templating

The package is designed so that Jinja2 should not be a dependency if the library will only be used for creating PDFs from raw HTML files. However, neither the command line version nor the templating functionality will work or without Jinja2 installed, raising an ImportError.

Usage

Module

Raw HTML file (no templating)

import qtpdfprinter.converter as converter

converter.convert_html_to_pdf(sourc_path, destination_path)

Jinja2 template

import qtpdfprinter.templating as templating

templating.convert_template_to_pdf(sourc_path, destination_path, context={})

Command Line

From the command line:

python html2pdf.py <html_source> <pdf_destination>

Dependencies

PySide / PyQt4 Jinja2 (might make optional if only needing raw HTML rendering)

About

Uses PySide / PyQt4 (will add support) for creating PDF's using Jinja2 templating

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages