HTML to PDF API for developers

HTML to PDF API without maintaining Chromium

Generate PDFs from HTML without maintaining Chromium. Create reusable templates, send JSON from your app or workflow, and get hosted PDF and preview URLs back from a simple REST API.

Start freeView API docs5 free PDF generations

Request flow

HTML template plus JSON data

REST API

Send HTML/template data

Use an existing template and pass structured JSON from your app, script, CRM, or automation tool.

Peedief renders the PDF

Hosted rendering handles Chromium, print CSS, page sizing, fonts, and delivery infrastructure.

Use the PDF and preview URLs

Store the PDF, email it, attach it to a record, or embed the preview in your product.

Free tier

5 PDFs

API style

REST

Input

HTML + JSON

Output

PDF + preview URL

API examples

Generate a PDF from any backend that can send HTTP

Use Peedief from a server, scheduled job, webhook handler, internal tool, or automation workflow. The API returns hosted links you can pass to the next step.

curl

curl -X POST "https://peedief.com/api/templates/by-name/invoice/pdf" \  -H "x-api-key: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{
    "contextJson": {
      "customerName": "Acme Studios",
      "invoiceNumber": "INV-1042",
      "items": [
        { "description": "PDF generation", "quantity": 1, "price": 99 }
      ],
      "total": 99
    },
    "fileName": "invoice-1042.pdf"
  }'

Node.js

const response = await fetch(
  'https://peedief.com/api/templates/by-name/invoice/pdf',
  {
    method: 'POST',
    headers: {
      'x-api-key': process.env.PEEDIEF_API_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      contextJson: {
        customerName: 'Acme Studios',
        invoiceNumber: 'INV-1042',
        total: 99
      },
      fileName: 'invoice-1042.pdf'
    })
  }
);

const pdf = await response.json();
console.log(pdf.url, pdf.previewUrl);

Python

import os
import requests

response = requests.post(
    "https://peedief.com/api/templates/by-name/invoice/pdf",
    headers={
        "x-api-key": os.environ["PEEDIEF_API_KEY"],
        "Content-Type": "application/json",
    },
    json={
        "contextJson": {
            "customerName": "Acme Studios",
            "invoiceNumber": "INV-1042",
            "total": 99,
        },
        "fileName": "invoice-1042.pdf",
    },
)

pdf = response.json()
print(pdf["url"], pdf["previewUrl"])

Why not Puppeteer?

Stop debugging browser infrastructure when you only need PDFs

Puppeteer and Playwright are powerful when you need browser automation. But HTML-to-PDF production work often turns into Docker images, missing fonts, serverless limits, timeouts, queue workers, and page-break bugs.

Peedief gives you the document workflow without the rendering infrastructure tax: templates in, JSON across the wire, PDF and preview links out.

Running Puppeteer yourself

  • Maintain Chromium versions, launch flags, Docker layers, and serverless workarounds
  • Debug missing fonts, memory pressure, crashes, slow cold starts, and render timeouts
  • Build storage, preview links, retries, API keys, and workflow glue around each render

Using Peedief

  • Call a hosted HTML to PDF API from any backend or automation tool
  • Reuse templates for invoices, reports, certificates, contracts, and receipts
  • Return hosted PDF and preview URLs your product or workflow can use immediately

Use cases

Built for recurring business documents

Peedief works best when you need the same document type generated repeatedly from fresh data.

Invoices

Render line items, totals, tax details, payment terms, and branded invoice layouts from JSON.

Certificates

Generate personalized certificates from course completions, events, memberships, and awards.

Reports

Turn analytics, AI outputs, CRM summaries, or scheduled data exports into polished PDF reports.

Contracts

Create consistent offer letters, agreements, statements of work, and signed document packets.

Receipts

Send compact proof-of-payment PDFs from checkout, billing, and internal finance workflows.

Automations

Trigger PDF generation from n8n, Make, Zapier, Airtable, forms, CRMs, and webhooks.

Comparison

Peedief vs Puppeteer vs PDF generator APIs

Choose the tool based on what you want to own. Peedief is for teams that want document generation without running browser infrastructure.

Category
Peedief
Puppeteer
PDFShift / API2PDF / DocRaptor
Infrastructure
Hosted PDF rendering API with preview and PDF URLs returned by request.
You maintain Chromium, Docker images, memory limits, fonts, queues, and retries.
Usually hosted, but often focused on raw conversion instead of reusable document workflows.
Templates
Reusable HTML/CSS templates filled with structured JSON for repeat generation.
You build and maintain the template layer yourself.
Varies by vendor; many APIs treat each request as one-off HTML conversion.
Developer workflow
REST API, API keys, hosted previews, and examples for backend apps and automations.
Maximum browser control, with production rendering responsibility in your app.
Good for simple API conversion; compare support for previews, templates, and automation use cases.
Best fit
Invoices, certificates, reports, receipts, contracts, and recurring document generation.
Custom browser automation where you truly need direct page control.
Basic HTML-to-PDF conversion, compliance-heavy rendering, or legacy vendor-specific requirements.

Free HTML to PDF API tier

Test the whole PDF workflow before you pay

Start with 5 free PDF generations. Validate your template, API request, hosted PDF URL, preview URL, and downstream delivery flow before moving to a paid plan.

$0

5 PDF generations included

Enough to test a real invoice, report, certificate, receipt, or automation workflow.

Start free

FAQ

HTML to PDF API questions

The short version: call the REST API with template data, then use the PDF and preview URLs Peedief returns.

Is Peedief an HTML to PDF REST API?

Yes. Peedief exposes a REST API for generating PDFs from reusable HTML/CSS templates and structured JSON data. Send an authenticated request and get PDF and preview URLs back.

Can I use the API from JavaScript or Node.js?

Yes. Any JavaScript or Node.js app can call Peedief with fetch, axios, or your HTTP client of choice. The page examples include a Node.js request you can adapt.

Can I generate PDFs from Python, PHP, Java, or other languages?

Yes. Peedief is language-agnostic because it is HTTP-based. Python, PHP, Java, Ruby, Go, and backend frameworks can all call the API as long as they can send JSON over HTTPS.

Does Peedief replace Puppeteer?

Peedief replaces Puppeteer for teams that only need reliable document generation, not full browser automation. You avoid maintaining Chromium, fonts, Docker images, queue workers, and rendering retries.

Can I use Peedief with n8n, Make, Zapier, Airtable, or CRMs?

Yes. Any automation tool that can send an HTTP request can generate a PDF with Peedief. That makes it useful for form submissions, CRM events, spreadsheet rows, scheduled reports, and customer notifications.

Does it support CSS, page breaks, headers, footers, and fonts?

Peedief is built for print-friendly HTML/CSS templates, including page sizing, repeated data, headers, footers, and page-break-aware layouts. For advanced layouts, test your template with representative data before production use.

Do API responses include a preview URL or webhook-friendly output?

Generated PDFs include hosted PDF and preview URLs, so your app or workflow can store, email, embed, or pass the result to the next step. That fits webhook and automation flows well.

Is there a free HTML to PDF API tier?

Yes. Peedief includes 5 free PDF generations so you can test templates, API requests, preview URLs, and your end-to-end workflow before upgrading.

Start rendering

Generate PDFs from HTML without maintaining Chromium.

Create your first template, send JSON, and get the PDF and preview URL back. The first 5 PDF generations are free.