django-wkhtmltopdf

django-wkhtmltopdf allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file.

Quickstart

pip install django-wkhtmltopdf

Grab the wkhtmltopdf binary for your platform.

settings.py

INSTALLED_APPS = (
    # ...
    'wkhtmltopdf',
    # ...
)

urls.py

from django.conf.urls.defaults import url, patterns
from wkhtmltopdf.views import PDFTemplateView

urlpatterns = patterns('',
    url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html',
                                           filename='my_pdf.pdf'), name='pdf'),
)

Contribute

You can fork the project on Github.