Integration-PDF API – Fast and Affordable Document Generation-html-to-pdf

Convert your HTML document into PDFs

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.


Reponse Type

Make sure that the response type is set to PDF.

CustomJS Code

const { HTML2PDF } = require('./utils');

return HTML2PDF(input.html);

Execution via API request

Passing the HTML as a string

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