django-puppeteer-pdf

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

Quickstart

pip install django-puppeteer-pdf

Install the puppeteer-pdf cli puppeteer-pdf for your platform.

settings.py

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

urls.py

from django.conf.urls.defaults import url, patterns
from puppeteer_pdf.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.