printwell
v0.1.11
Published
High-fidelity HTML to PDF conversion using Chromium
Maintainers
Readme
printwell
High-fidelity HTML to PDF conversion using Chromium's rendering engine.
Installation
npm install printwellUsage
import { Converter, htmlToPdf } from "printwell";
// Simple conversion
const result = await htmlToPdf("<h1>Hello, World!</h1>");
result.writeToFile("output.pdf");
// With options
const converter = new Converter();
const pdf = await converter.htmlToPdf(
html,
{},
{
pageSize: "A4",
printBackground: true,
}
);Features
- Rendering: Full HTML5/CSS3 support via Chromium's Blink engine
- Large Documents: Automatic chunking and parallel rendering for documents >50MB
- Watermarks: Text and image overlays with positioning and opacity control
- Bookmarks: Table of contents and navigation structure
- Annotations: Highlights, sticky notes, and geometric shapes
Other Packages
- Rust: printwell on crates.io
- Python: printwell on PyPI
- CLI: printwell-cli on crates.io
Links
License
AGPL-3.0
