Skip to main content

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

django-uwkhtmltopdf-0.4.0.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file django-uwkhtmltopdf-0.4.0.tar.gz.

File metadata

File hashes

Hashes for django-uwkhtmltopdf-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c65e9336f66ff4b7de5bf61c88d0a3e6b8d44c9db4fb329b5e92ed25f43a1b4f
MD5 647b4b1a000fe9d84360911e75d2eda7
BLAKE2b-256 c4e9c661bd77d630616390602687e3bdc5fde924f5b14e2f1d9579c2289c08a1

See more details on using hashes here.

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