Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

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.

Files for django-uwkhtmltopdf, version 0.5.0
Filename, size File type Python version Upload date Hashes
Filename, size django-uwkhtmltopdf-0.5.0.tar.gz (4.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page