printwell
Early Development - This project is in active early development. APIs may change, and some features are incomplete. Some commercial features may become free in future releases. Feedback and contributions welcome!
High-performance HTML to PDF conversion powered by Chromium’s rendering engine.
printwell is a library and CLI tool that converts HTML to PDF using Chromium’s Blink rendering engine, compiled as a native library without the browser chrome. This gives you pixel-perfect PDF rendering with full CSS support, web fonts, and modern layout features.
Key Features
- Pixel-perfect rendering - Uses Chromium’s Blink engine for accurate HTML/CSS rendering
- No browser required - Compiled as a native library, no Chrome/Chromium installation needed
- Multiple language bindings - Use from Rust, Node.js, or Python
- PDF post-processing - Add watermarks, bookmarks, annotations, forms, and more
- Digital signatures - Sign PDFs with PAdES-compliant signatures
- Encryption - Password-protect PDFs with AES-256 encryption
- PDF/A compliance - Generate archival-ready PDFs
- PDF/UA accessibility - Create accessible PDFs for screen readers
- Small binary size - ~50MB native library (no V8/JavaScript engine)
Quick Example
CLI
# Convert HTML file to PDF
printwell convert input.html -o output.pdf
# Convert URL to PDF
printwell convert https://example.com -o example.pdf
# Add watermark
printwell watermark input.pdf -o output.pdf --text "CONFIDENTIAL"
# Sign PDF
printwell sign input.pdf -o signed.pdf --cert certificate.p12 --password secret
Rust
#![allow(unused)]
fn main() {
use printwell::{Converter, PdfOptions};
let converter = Converter::new()?;
let result = converter.html_to_pdf(
"<h1>Hello, World!</h1>",
None,
Some(PdfOptions::default()),
)?;
result.write_to_file("output.pdf")?;
}
Node.js
import { Converter } from 'printwell';
const converter = new Converter();
const result = await converter.htmlToPdf('<h1>Hello, World!</h1>');
await result.writeToFile('output.pdf');
Python
from printwell import Converter
converter = Converter()
result = converter.html_to_pdf("<h1>Hello, World!</h1>")
result.write_to_file("output.pdf")
Next Steps
- Installation - Get printwell set up
- Quick Start - Your first PDF in 5 minutes
- Features - Explore all capabilities