wkhtmltopdf
Simple python wrapper for wkhtmltopdf
Decision gist · record as of 2026-08-14
No. The package is abandoned (last release 2011-07-21, repository archived) and targets python 2.5+, which is long out of support. Install only if maintaining legacy Python 2 code already using this package. The system-level dependency burden, high install friction, and lack of maintenance make it unsuitable for new projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires system installation of Xvfb, wkhtmltopdf, xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic, and flashplugin-nonfree before the Python package can function.
- High install friction: requires system-level dependencies (Xvfb, wkhtmltopdf, fonts, flashplugin-nonfree) to be installed separately before the Python package can function.
- Package is abandoned since 2011 with no maintenance activity.
License · maintenance · safety
BSD (permissive) — BSD license is permissive and poses no restrictions on use, modification, or distribution.
last release 2011-07-21 (5503 days) · last repo commit 2019-08-07 · 109 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,433 downloads/mo, #13,084 on PyPI
Alternatives
Verify before relying
from wkhtmltopdf import WKHtmlToPdf
wkhtmltopdf = WKHtmlToPdf(
url='http://www.example.com',
output_file='~/example.pdf',
)
wkhtmltopdf.render()- Whether the package works with Python versions beyond 2.5–2.7
- Current compatibility with modern wkhtmltopdf versions and contemporary Linux distributions
- Whether Flash plugin dependency remains relevant or is a legacy artifact
What it is and what it does
python-wkhtmltopdf is a Python wrapper around the wkhtmltopdf command-line utility, which uses a headless WebKit renderer to convert web pages and HTML to PDF. It exposes wkhtmltopdf's rendering capabilities through a Python class and function interface, allowing you to specify a URL or HTML content, configure rendering options like screen_resolution, color_depth, dpi, orientation, and write the resulting PDF to a file.
The package includes optional Flash plugin support and can be used as a class, a function, a command-line tool, or an HTTP API. However, it has been abandoned since 2011 and requires substantial system-level setup: you must install Xvfb, wkhtmltopdf itself, system fonts, and flashplugin-nonfree before the Python package can run. No runtime Python dependencies are declared.
Use it for
- Generate PDFs from live web pages or HTML templates in legacy Python 2 applications
- Batch convert URLs to PDF files with customizable rendering parameters like dpi and orientation
- Render web content with Flash animations to PDF using the flash_plugin option
- Expose PDF generation as an HTTP API endpoint via the built-in API server
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
The package is abandoned (last release 2011-07-21, repository archived) and targets python 2.5+, which is long out of support. Install only if maintaining legacy Python 2 code already using this package. The system-level dependency burden, high install friction, and lack of maintenance make it unsuitable for new projects.
Install
wkhtmltopdf on PyPI
Before you install
High install friction: requires system-level dependencies (Xvfb, wkhtmltopdf, fonts, flashplugin-nonfree) to be installed separately before the Python package can function. Package is abandoned since 2011 with no maintenance activity.
Requires system installation of Xvfb, wkhtmltopdf, xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic, and flashplugin-nonfree before the Python package can function.
License in practice
BSD license is permissive and poses no restrictions on use, modification, or distribution.
Quickstart
from wkhtmltopdf import WKHtmlToPdf
wkhtmltopdf = WKHtmlToPdf(
url='http://www.example.com',
output_file='~/example.pdf',
)
wkhtmltopdf.render()
Verify before relying
- Whether the package works with Python versions beyond 2.5–2.7
- Current compatibility with modern wkhtmltopdf versions and contemporary Linux distributions
- Whether Flash plugin dependency remains relevant or is a legacy artifact
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Abandoned 5,503 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 98,433 / month, #13,084 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: Internet :: WWW/HTTP :: Dynamic Content |
Evidence: wkhtmltopdf-0.2-py2.5.egg; wkhtmltopdf-0.2-py2.6.egg; wkhtmltopdf-0.2-py2.7.egg; wkhtmltopdf-0.2.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “convert url to pdf python”
- wkhtmltopdfWraps the wkhtmltopdf command-line tool to convert URLs and HTML to…
- pdfkitPython wrapper for wkhtmltopdf that converts HTML to PDF using the…
- convertapiA Python client for the ConvertAPI online file conversion service,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also pdfkit · django-wkhtmltopdf · imgkit · fpdf · pdf2image · gh-md-to-html · gotenberg-client · nokap · pypandoc-binary · pypandoc