See what you can build

Real-world examples with copy-paste code snippets. Try them instantly in the sandbox.

Invoices & Receipts

Generate multi-page invoices with repeating table headers and smart page breaks.

Tables break across pages, headers disappear, totals land on wrong pages

typescript
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: invoiceHtml,
    paperWidth: '210mm',
    paperHeight: '297mm',
    marginTop: '20mm',
    marginBottom: '20mm'
  })
})

const pdf = await response.blob()
Loading PDF viewer...

Reports & Dashboards

Create professional reports with charts, tables, and complex layouts.

Complex layouts with charts and tables break when printed

typescript
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: reportHtml,
    paperWidth: '210mm',
    paperHeight: '297mm',
    printBackground: true
  })
})

const pdf = await response.blob()
Loading PDF viewer...

Dashboard exports lose styling and interactive elements

typescript
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: dashboardHtml,
    landscape: true,
    printBackground: true
  })
})

const pdf = await response.blob()
Loading PDF viewer...

Certificates & Diplomas

Design elegant certificates with proper print quality.

Certificate designs lose quality when converted to PDF

typescript
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: certificateHtml,
    landscape: true,
    printBackground: true,
    paperWidth: '297mm',
    paperHeight: '210mm'
  })
})

const pdf = await response.blob()
Loading PDF viewer...

Contracts & Legal

Generate legal documents with proper orphan/widow control.

Signatures end up on separate pages from contract text

typescript
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: contractHtml,
    paperWidth: '210mm',
    paperHeight: '297mm',
    marginTop: '25mm',
    marginBottom: '25mm',
    marginLeft: '25mm',
    marginRight: '25mm'
  })
})

const pdf = await response.blob()
Loading PDF viewer...

LLM Workflows

Turn Claude or GPT HTML output into polished PDFs.

LLM generates HTML but users need downloadable PDFs

typescript
// Generate HTML with Claude/GPT
const htmlFromLLM = await openai.chat.completions.create({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Generate an HTML report...' }]
})

// Convert to PDF with NeatPDF
const response = await fetch('https://api.neat-pdf.com/html-to-pdf', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    html: htmlFromLLM.choices[0].message.content,
    printBackground: true
  })
})

const pdf = await response.blob()
Loading PDF viewer...

No-Code Integrations

Use NeatPDF in Make, n8n, Zapier with simple curl commands.

Need PDF generation without writing code

bash
curl -X POST https://api.neat-pdf.com/html-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Hello World</h1>"}' \
  --output result.pdf
Loading PDF viewer...

Automating document generation in workflow tools

typescript
// n8n HTTP Request node configuration
{
  "method": "POST",
  "url": "https://api.neat-pdf.com/html-to-pdf",
  "authentication": "genericCredentialType",
  "genericAuthType": "httpHeaderAuth",
  "options": {
    "response": { "response": { "responseFormat": "file" } }
  },
  "bodyParameters": {
    "html": "={{ $json.htmlContent }}"
  }
}
Loading PDF viewer...

Ready to build?

Try these examples in the sandbox or dive into the API docs.