A Django app to generate pdfs from templates using wkhtmltopdf
Project description
A simple Django app to generate pdfs from templates using wkhtmltopdf.
The code is basically a fork of django-xhtml2pdf that uses wkhtmltopdf to avoid xhtml2pdf shortcomings.
Please note that the app is thought to be simple not feature rich.
Usage
In settings.py:
WKHTMLTOPDF_CMD = ‘/path/to/wkhtmltopdf’
In views.py:
from django_uwkhtmltopdf.utils import generate_pdf
- def myview(response):
resp = HttpResponse(content_type=’application/pdf’) result = generate_pdf(‘my_template.html’, file_object=resp) return result
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
Close
Hashes for django-uwkhtmltopdf-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cfe8bc8aa9aee39b5dbc8b3b4f9f9698e3f2e7482c826eda1c9178e45ec80a4 |
|
MD5 | f373ed1b7eb1f71a178fa95eaa8ad686 |
|
BLAKE2b-256 | 3c5d39527f22d00481117de0544c59dfc016a7e02aa7d296f198c88340dd8d29 |