H2P - Open Source HTML to PDF Converter
Free, commercial-ready PDF generation API with no AGPL restrictions. Convert HTML to PDF with simple REST API integration.
Try it out
curl --location \
--request POST 'https://api.h2p.dac.digital/print' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Example File",
"html": "<html><body><h1>Hello</h1><p>This is H2P.</p></body></html>"
}' --output HelloFromH2P.pdf
Truly free for commercial use
Some of the most popular HTML to PDF open source solutions out there require a commercial license under the AGPL for proprietary applications. Unlike them, H2P offers a permissive license that allows unrestricted use in commercial projects without the obligation to open-source proprietary code.
Simplified compliance and peace of mind
H2P reduces legal risks and ensures that you won't violate license terms because it eliminates the complexities associated with AGPL licensing. No costly legal issues or the need for retroactive licensing.
Developer-friendly integration
H2P was created by developers with other developers in mind. It supports easy integration into different tech stacks for rapid adoption and short development time.
High-quality PDF rendering
H2P delivers accurate and consistent PDF outputs, preserving the fidelity of HTML layouts, styles, and embedded elements, which is crucial for documents like invoices, reports, and contracts.