html to pdf apiurl to pdf apigenerate pdf from htmlpdf generator apiconvert webpage to pdfinvoice pdf api

HTML to PDF API

Convert HTML content or any URL into a production-ready PDF instantly.

Transform raw HTML strings or live URLs into polished PDF documents. Supports custom page formats, margins, landscape mode and background printing — ideal for invoices, reports and contracts.

POST/api/trpc/htmlToPdf.convert
3 tokens / callAPI online

How it works

Three steps. No complex setup.

1

Send your request

Make a POST with the data you want to analyze. Include your API key in the Authorization header.

2

We process server-side

Our engine validates, analyzes and enriches the data in under 200ms. No external APIs, no network latency.

3

Receive the result

Typed JSON with all documented fields. Clear errors if something fails. Production ready.

Who is it for?

SaaS platforms generating invoices, reports or contracts
E-commerce stores exporting order summaries as PDF
Developers building document generation pipelines
No-code tools that need PDF export functionality

Response example

Real input and output. What you send and what you get back.

// Input

{
  "html": "<h1>Hello World</h1><p>This is a test document.</p>",
  "options": {
    "format": "A4",
    "margin": "20px",
    "landscape": false
  }
}

// Output

{
  "success": true,
  "pdf_base64": "JVBERi0xLjQKJeLjz9MKNSAwIG9iago...",
  "size_bytes": 24821,
  "pages": 1,
  "format": "A4",
  "generation_time_ms": 380
}

Try it now

// live demo — no account needed to try

Playground

Demo activa3 tokens

Integrate into your project

Copy and paste. Replace YOUR_API_KEY with your real key.

curl -X POST https://jsnhengine.com/api/v1/html-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Hello World</h1><p>Test document.</p>","options":{"format":"A4"}}'

Why choose JSNH Engine Lab

Low latency

Responses in under 200ms

Secure authentication

API keys with per-plan rate limiting

Usage tracking

Every request logged with metrics

Production ready

Input validation and typed errors

Frequently asked questions

Everything you need to know before integrating.

Other modules

Expand your integration with more APIs from the catalogue.

Community reviews

What developers using this module say

Sign in to leave a review

No reviews yet. Be the first!

// production ready

Start using HTML to PDF API

Sign up free and get 1,000 tokens to start. No credit card. No complex setup.