{"categories":[{"label":"Utilities","url":"https://skillfed.io/packages/category/utilities/2"},{"label":"Text Processing","url":"https://skillfed.io/packages/category/text-processing"},{"label":"Markup","url":"https://skillfed.io/packages/category/text-processing-markup"},{"label":"HTML","url":"https://skillfed.io/packages/category/text-processing-markup-html"},{"label":"General","url":"https://skillfed.io/packages/category/text-processing-general"},{"label":"XML","url":"https://skillfed.io/packages/category/text-processing-markup-xml"}],"enrichment":{"capability":"Python wrapper for wkhtmltopdf that converts HTML to PDF using the Webkit rendering engine, supporting URLs, files, and HTML strings as input.","skillfed_tags":["pdf-generation","html-conversion","webkit-rendering"],"use_cases":["Generate PDF reports from HTML templates in a web application without relying on a headless browser service.","Batch-convert multiple HTML files or URLs to PDF for archival or distribution.","Create invoices or receipts by rendering HTML with CSS styling directly to PDF.","Embed PDF generation in a Python script that needs to produce documents from web content.","Add table of contents, headers, and footers to HTML-based documents during PDF export."],"what_it_does":"pdfkit is a thin Python wrapper around the wkhtmltopdf command-line tool, which uses the Webkit rendering engine to convert HTML into PDF files. It lets you generate PDFs from live URLs, local HTML files, or HTML strings passed directly to the API, with support for options like page size, margins, headers, footers, and table of contents. The package handles the subprocess plumbing and argument construction so you don't have to shell out to wkhtmltopdf manually.\n\nThe wrapper requires wkhtmltopdf to be installed as a separate system binary; pdfkit itself has no Python runtime dependencies. It supports both Python 2 and 3 (though Python 2 is long obsolete) and offers a simple three-function API: from_url(), from_file(), and from_string(). You can also retrieve the PDF as a byte string instead of writing to disk, and pass detailed configuration options via dictionaries.","worth_installing":"Yes, if you need simple HTML-to-PDF conversion and are willing to manage the wkhtmltopdf system dependency. The package is stable and widely used, but dormant\u2014no active maintenance since late 2023. Check the two known vulnerabilities before use in security-sensitive contexts. For new projects, consider whether a maintained alternative or headless-browser service better fits your risk tolerance."},"id":"pdfkit","links":{"html":"https://skillfed.io/packages/pdfkit","md":"https://skillfed.io/packages/pdfkit.md","pypi":"https://pypi.org/project/pdfkit/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2021-11-14","license_spdx":null,"license_treatment":"permissive","name":"pdfkit","python_support":"unspecified","summary":"Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt"},"popularity":{"monthly_downloads":7782391,"position":1696,"tier":"top_5000"},"security":{"n_vulnerabilities":2},"version":"1.0.0"}
