skillfed

django-wkhtmltopdf

Converts HTML to PDF using wkhtmltopdf.

django-wkhtmltopdf v3.4.0 174.3K downloads/30d#10,283 on PyPI325
Permissive license BSD-2-Clause Abandoned released

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-wkhtmltopdf

uv

uv add django-wkhtmltopdf

poetry

poetry add django-wkhtmltopdf

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4

Tags

django html to pdfwkhtmltopdf django integrationconvert html pdf djangodjango pdf generationhtml pdf converter django
pdf-generationabandoned

More Dynamic Content packages