Convert HTML to PDF. Beautiful printing with simple CSS.
commercial softwareself-hostablefree
Prince (princexml.com) is a commercial HTML-to-PDF formatter by YesLogic that typesets HTML and CSS for print and publishing. It supports CSS for paged media and JavaScript, and its PDF output includes bookmarks, links, metadata, encryption, font embedding and subsetting, and attachments. It installs as a binary (Homebrew, Docker images, Python and Node packages) with wrappers for Java, .NET, PHP and Rails, and is also available as a hosted API through DocRaptor and EuroPDF. A free licence covers non-commercial use only, and documents it makes carry notices that identify Prince.
Ways to install
Package managers
Problems it solves
- browser-based PDF rendering can't do footnotes, cross-references and proper book typesetting
- publish a print-ready book or journal straight from HTML and CSS
- I need the most complete CSS paged media support, whatever it costs
- our legal documents need exact page layout that Chrome's print to PDF keeps getting wrong
- typeset multi-column technical manuals with page numbers in the table of contents
- generate thousands of high-quality catalog PDFs on our own servers from HTML
- need a supported, licensed HTML to PDF engine for an enterprise product we ship to customers
- an HTML formatter with professional typography features like hyphenation and widows/orphans control
- convert XML content to print documents with CSS instead of XSL-FO
- the open-source HTML to PDF tools don't match what our designers lay out for print
Features
- HTML and XML to PDF with CSS
- CSS paged media
- JavaScript support
- bookmarks and links
- PDF metadata and encryption
- font embedding and subsetting
- PDF attachments
- Docker images
- Python, Node.js, Java, .NET, PHP and Rails wrappers
- Prince for Books branch
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Has official SDKs | plan not known |
Alternatives
The same job
These do what Prince does.
- DocRaptor The World's Most Advanced HTML to PDF API
- WeasyPrint Renders HTML and CSS to PDF, from Python or the command line
- ironpress HTML to PDF. In process. In pure Rust.
- Typst The new foundation for documents
- Puppeteer JavaScript API for Chrome and Firefox
- PDFShift From HTML to pixel-perfect PDFs in seconds