Respawn Tech Dev

Marketing & QR Codes

Dynamic QR CodeQR codes with editable destinations, custom design and analytics for every scan.

Documents

HTML to PDFConvert HTML and CSS to PDF, PNG or JPG — one document or 500 at once.

Artificial intelligence

Knowledge baseSemantic search over your documents for AI chatbots, assistants and agents.
See all products→
  • Developers
  • Use cases
  • Docs↗
  • Blog
Pricing
Sign inSign up
Respawn Tech Dev

Products

Dynamic QR CodeHTML to PDFKnowledge baseSee all products →

Resources

PricingDevelopersUse casesDocsBlog
Sign upSign in
  1. Home
  2. /Products
  3. /HTML to PDF

Documents · HTML to PDF API

Your HTML becomes a browser-quality PDF.

Send HTML and CSS and get back PDFs, PNGs or JPGs rendered by a real Chromium. Generate invoices, reports and certificates one at a time or in templated batches, without maintaining rendering servers.

Sign upRead the docs
curl -X POST 'https://api.respawntech.dev/v1/tools/document/pdf/convert' \
  -H "X-API-Token: $RESPAWN_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "html": "<h1>Fatura #001</h1><p>Total: R$ 199,90</p>",
  "format": "pdf",
  "page_size": "A4",
  "webhook_url": "https://seu-app.com/webhooks/pdf"
}'

Use cases

Convert HTML and CSS to PDF, PNG or JPG — one document or 500 at once.

  • Invoices, receipts and payment slips

    Turn the HTML you already have into documents ready to send to your customers.

  • Reports with charts

    Enable JavaScript to render charts and SPAs before generating the PDF.

  • Certificates and contracts in bulk

    One template, up to 500 variations per batch, with volume discounts.

How it works

From sign-up to first call in minutes

  1. 1

    Send the HTML

    POST HTML, CSS and options; get a conversion_id with status 202.

  2. 2

    Wait for the webhook

    Your endpoint is called when the job finishes — no polling.

  3. 3

    Download the file

    Download the PDF (or the batch ZIP) from the download endpoint.

Features

Built to run in production

  • Faithful rendering

    Headless Chromium with support for modern CSS, Google Fonts, and per-page headers and footers.

  • PDF, PNG or JPG

    Choose the format, page size (A4, Letter, Legal), orientation, margins and scale.

  • Templated batches

    Send a template with placeholders and up to 500 items; download everything as a ZIP.

  • Truly asynchronous

    Get a 202 right away and be notified by webhook when the file is ready.

  • Sandboxed JavaScript

    Turn on enable_js for pages that depend on scripts, waiting for a selector or a delay.

  • Retention under control

    Ephemeral files for ~24 h, retention up to 30 days or permanent, stored encrypted.

Pricing

Pay for usage, not a subscription

Each document starts at 1 credit. Retention beyond 3 days and JavaScript are add-ons, and batches of 10 items or more get an automatic discount.

HTML to PDF — per document

ItemCredits
Base conversion1.0
Retention up to 3 daysretention_days ≤ 3+0.0
Retention from 4 to 7 daysretention_days 4–7+0.5
Retention from 8 to 30 daysretention_days 8–30+2.5
Permanent retentionretention_days: -1+15.0
Sandboxed JavaScriptenable_js+0.25

HTML to PDF — batch discounts

FromDiscount
10+5%
20+10%
30+15%
40+20%

API reads (after the daily free quota)

Per-query prices, charged only after the day's free reads.

OperationCredits
List conversions or batches0.005
Conversion or batch status0.01
File or ZIP download0.03
See pricing

Use cases

What you can build

  • HTML to PDF

    PDF invoices and reports straight from your HTML

    Reuse the templates you already have and stop maintaining rendering servers.

    Invoices and reports
  • HTML to PDF

    Hundreds of certificates from a single template

    Send the template once along with the participant list; get everything back in a ZIP.

    Bulk certificates

FAQ

Frequently asked questions

How long does a conversion take?

Simple documents are usually ready in seconds. Since processing is asynchronous, use webhook_url to get notified without having to poll the status.

Can I use external fonts and images?

Yes. Use google_fonts_url for Google Fonts and absolute URLs for images and stylesheets.

How long is the file available?

By default, up to 3 days at no extra cost. You can choose ephemeral retention (~24 h), up to 30 days or permanent.

What if the conversion fails?

The status gives the reason in error_code. You can reprocess the conversion; failures don't produce a downloadable file.

Products

Every API, one account

Marketing & QR Codes

Dynamic QR Code

QR codes with editable destinations, custom design and analytics for every scan.

Artificial intelligence

Knowledge base

Semantic search over your documents for AI chatbots, assistants and agents.

Start integrating today

Create your account, generate a token and make your first call in a few minutes.

Sign upRead the docs
Respawn Tech Dev

Production-ready APIs. Pay only for what you use.

Products

  • Dynamic QR Code
  • HTML to PDF
  • Knowledge base
  • See all products
  • Pricing

Resources

  • Developers
  • Use cases
  • Docs
  • Blog

Company

  • About
  • Contact
  • Dashboard

© 2026 Respawn Tech LTDA — All rights reserved.

Privacy PolicyTerms of Use

Privacy & cookies

We use analytics cookies (Google Analytics and Plausible) only with your consent, to understand how the site is used. We do not show ads.

View policy