WeasyPrint
A command-line tool and Python library that turns HTML and CSS documents into PDF files.
These buttons open the developer's own site, repository or store listing in a new tab. wares.gg does not host downloads.
About WeasyPrint
WeasyPrint is a rendering engine for HTML and CSS that exports to PDF, aimed at web developers who want to produce reports, invoices, tickets, letters or whole books from markup they already know. It follows web standards for print, including page layouts, running headers and tables of contents.
It does not rely on a browser engine; its CSS layout engine is written in Python and designed for pagination. It runs on Python 3.10 or later and can be used from the command line or inside an application.
Strengths
- Uses standard HTML and CSS print features
- No browser engine needed
- Actively maintained with frequent releases
- Sample reports, invoices and books to start from
Limitations
- Requires a Python 3.10+ environment
- Aimed at developers rather than casual PDF conversion
- No JavaScript execution, as it is not a browser
Details
- Pricing
- FreeFree and open source under the BSD 3-Clause licence; paid support packages are offered.
- License
- BSD-3-Clause
- Developer
- Kozea and CourtBouillon
- Platforms
- Command line
- How it runs
- Downloadable app
- Account
- Not required
- Works offline
- Yes
- Best suited for
- Developers generating invoices, reports or books as PDF from HTML templates
- Categories
- PDF tools, Developer tools
- Last verified
- Added
- Provenance
- Facts checked against the developer's own pages and store listings, 2 sources on file.
Alternatives to WeasyPrint
Compare allSoftware that can replace WeasyPrint for an important use case, and what changes if you switch.
Gotenberg
Self-hosted Docker API that converts web pages, Markdown and Office documents into PDF files.
Gotenberg is a self-hosted Docker API bundling Chromium and LibreOffice, so it runs JavaScript and also converts Office files and Markdown, unlike WeasyPrint's Python library.
Similar software
Related functionality, not necessarily a direct replacement.
Ghostscript
PostScript and PDF interpreter behind a great deal of other software.
pdfcpu
Go library and command line for validating and transforming PDFs.
qpdf
Command-line tool for content-preserving PDF transformations.
pdf2htmlEX
A command-line converter that turns PDF files into HTML while keeping text and layout.
Cpdf
Command-line PDF toolkit covering split, merge, stamp and encrypt.
Stirling PDF
A self-hosted web PDF toolkit for merging, splitting, converting, signing and editing PDFs on your own server.