django-wkhtmltopdf
Converts HTML to PDF using wkhtmltopdf.
What it is and what it does
django-wkhtmltopdf is a Django app that integrates the wkhtmltopdf command-line tool to render HTML templates directly to PDF files within your Django views. It wraps the external wkhtmltopdf binary and exposes it through Django view classes, allowing you to generate PDF documents from your existing HTML templates with minimal configuration.
The package depends only on six and requires you to install the wkhtmltopdf binary separately on your system along with the libfontconfig library. It has been marked abandoned since early 2023, with the last commit in January 2023 and no releases since February 2022, meaning it will not receive updates for newer Django or Python versions.
Use it for:
- Generate PDF invoices or receipts from Django templates in web applications.
- Create downloadable PDF reports from database queries rendered as HTML.
- Export user-facing web pages to PDF format for archival or sharing.
- Build PDF generation endpoints in Django REST APIs that return PDF files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps the wkhtmltopdf binary to convert HTML to PDF within Django views, providing a Django app that handles HTML-to-PDF rendering.
No. The package is abandoned with no maintenance since early 2023 and classifiers indicate support only for Python 2.6–3.4, making it incompatible with modern Python and Django versions. If you need HTML-to-PDF in Django, consider actively maintained alternatives instead.
Install
django-wkhtmltopdf on PyPI
pip
pip install django-wkhtmltopdfuv
uv add django-wkhtmltopdfpoetry
poetry add django-wkhtmltopdfInstalling django-wkhtmltopdf
Before you install
Installation is straightforward (low friction), but the package is abandoned as of 2023 with no recent maintenance. The last commit was 2023-01-23 and no updates have been released since 2022-02-24, so security patches and compatibility fixes are unlikely.
License in practice
Licensed under BSD-2-Clause (permissive), allowing commercial and private use with minimal restrictions, though you should retain the license notice in distributions.
Quickstart
pip install django-wkhtmltopdf
# In settings.py:
INSTALLED_APPS = ['wkhtmltopdf', ...]
# In views.py:
from wkhtmltopdf.views import PDFTemplateView
class MyPDFView(PDFTemplateView):
template_name = 'my_template.html'
Requires the wkhtmltopdf static binary to be installed separately on the system and libfontconfig as a system dependency (e.g., via package manager).
Verify before relying
- Whether the package works reliably with modern Django versions (3.2+, 4.x, 5.x) given the abandoned status and old Python version classifiers.
- Whether wkhtmltopdf binary compatibility issues have emerged on recent operating systems or architectures.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — six |
| Maintenance | abandoned — 1,632 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 174,344/month — #10,283 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_wkhtmltopdf-3.4.0-py2.py3-none-any.whl
Keywords: django, wkhtmltopdf, pdf
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
pdfkitPython wrapper for wkhtmltopdf that converts…
permissive · top 5,000 on PyPI
wkhtmltopdfWraps the wkhtmltopdf command-line tool to…
permissive · top 15,000 on PyPI
imgkitimgkit wraps the wkhtmltoimage command-line…
permissive · top 15,000 on PyPI
gotenberg-clientA fully-typed Python client for the Gotenberg…
copyleft · top 15,000 on PyPI
fpdfGenerates PDF documents from Python code,…
copyleft · top 5,000 on PyPI
weasyprintWeasyPrint converts HTML and CSS into PDF…
permissive · top 1,000 on PyPI
sphinxcontrib-svg2pdfconverterConverts SVG images to PDF or PNG for Sphinx…
permissive · top 15,000 on PyPI
django-ckeditorIntegrates CKEditor 4.18.0 rich-text editing…
permissive · top 5,000 on PyPI
sphinx-simplepdfSphinx-SimplePDF is a Sphinx extension that…
permissive · top 15,000 on PyPI
gh-md-to-htmlConverts GitHub-flavored Markdown to HTML with…
unclear · top 15,000 on PyPI