Easily convert HTML, styled with CSS and powered by JavaScript, into high-quality PDF documents using our API. Perfect for invoices, reports, or any dynamic web content.
Make sure that the response type is set to PDF.
const { HTML2PDF } = require('./utils');
return HTML2PDF(input.html);
This example shows how to provide your HTML content. The maximum allowed payload size is 6 MB.
curl -X POST https://e.customjs.io/zeXXXy \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY_HERE" \
-d '{
"html": "<h1>Hello World</h>"
}' --output hello-world.pdf