Developer Guide
HTML to PDF API for secure document generation
An HTML to PDF API converts raw HTML into a finished PDF over HTTP. XeroPDF is designed for software teams that need privacy-first rendering, predictable pricing, password-protected output, and webhook delivery for invoices, statements, internal reports, and customer-facing documents.
Free Tier
50
free credits for developers
Pricing Model
$10+
prepaid credit packs, no subscription
Security Feature
AES-256
password protection for PDFs
Why teams use an HTML to PDF API
HTML to PDF APIs are used when applications need to turn existing web layouts into downloadable or archived documents. This is common in billing systems, reporting tools, financial platforms, internal admin products, and customer communication workflows.
- Generate invoices, account statements, and order confirmations
- Convert dashboard views into downloadable management reports
- Create customer-ready PDFs from existing HTML templates
- Protect sensitive PDFs with passwords before delivery
- Send completed files to downstream systems through webhooks
XeroPDF HTML to PDF API features
Rendering controls
Use page format, custom width and height, landscape mode, page ranges, CSS page size preferences, margins, and render timing controls.
PDF security
Add an optional password to encrypt PDFs before they are returned to the client or delivered to a webhook destination.
Asynchronous delivery
Send a `webhookUrl` to receive generated documents without blocking the originating request.
Privacy-first architecture
XeroPDF positions the service around in-memory document rendering for privacy-sensitive workflows.
Sample request
The API authenticates with `x-api-key` and accepts HTML payloads over JSON.
curl -X POST https://xeropdf.com/v1/pdf \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"html": "<html><body><h1>Invoice</h1></body></html>",
"format": "A4",
"printBackground": true,
"password": "secure_pass_123",
"webhookUrl": "https://example.com/pdf-ready"
}'
Published pricing
| Plan | Price | Credits | Best fit |
|---|---|---|---|
| Developer | $0.00 | 50 | Testing and initial integration |
| Starter | $10.00 | 500 | Low-volume production PDFs |
| Pro | $40.00 | 2,500 | Teams using webhooks and higher volume |
| Enterprise | $100.00 | 10,000 | High-volume automated document generation |
Related resources
HTML to Screenshot API
Use the same rendering model for PNG, JPEG, and WebP output.
Secure PDF API for fintech and healthtech
See how XeroPDF positions privacy-first rendering for sensitive workflows.
XeroPDF vs DocRaptor
Compare XeroPDF with a premium print-oriented HTML-to-PDF provider.
XeroPDF vs PDFShift
Compare XeroPDF with a well-known Chromium-focused rendering API.
Invoice PDF API
See a high-intent billing workflow built on HTML-to-PDF generation.
Account statement PDF API
See how XeroPDF fits periodic statement generation workflows.
Compliance document PDF API
Review the privacy-sensitive workflow angle for generated documents.
Report PDF API
Generate internal or customer reports from HTML templates and dashboards.
OpenAPI specification
Inspect the machine-readable API schema for endpoints and fields.
Privacy policy
Review the published account-level and API-level data handling details.