HTML to PDF Converter
Convert HTML content to a PDF document with proper formatting and styling
Parameters
| name | in | type | required | description |
|---|---|---|---|---|
html |
body | string | required | Up to 512 KB. Rendered offline: put CSS in a style block and images in as data URIs, remote files don't load. Scripts are removed |
layout |
body | string | optional |
document renders your HTML as it is: your fonts and margins, @page size, as many pages as it needs. single_page (the default) fits it into one A4 page in Arial and cuts off what doesn't fit
one of
single_pagedocument default single_page
|
Request
Send your key in the X-API-Key header. More languages and patterns live on the
code examples page.
curl -s -X POST "https://apixies.io/api/v1/html-to-pdf" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<h1>Hello World</h1>\n<p>Your HTML content here...</p>"}'
Response
The result sits under data in the standard envelope. See the
response format guide for errors and status codes.
returns
- body
- The rendered PDF, served as application/pdf.
HTTP/1.1 200 OK Content-Type: application/pdf <raw file bytes, not a JSON envelope>
Authentication and limits
This endpoint needs an API key. Use the sandbox ("try it" above) to test it without registering. See the authentication guide for details.
Standard rate limits apply to this endpoint.
Common use cases
Invoice and receipt generation
Generate PDF invoices, receipts, and statements from HTML templates. Customize headers, footers, and page sizes for professional documents.
Report generation
Convert dynamic HTML dashboards and reports into downloadable PDFs. Perfect for scheduled reports sent via email to stakeholders.
Content archiving
Archive web pages as PDFs for compliance, legal records, or offline reference. Capture the full rendered content with styling intact.
related endpoints
guides
More documentation
Get a free API key
A temporary key takes one click and no signup. Register and you get 75 requests/day. Free tier is for development & small projects.