HTML to PDF · Document Extraction

Send HTML.
Get a perfect PDF.

A simple API that turns your HTML into a pixel-perfect PDF. No headless browser to manage, no dependencies to install, no infrastructure to maintain. And the reverse: send any document and get its text back.

request.js
const response = await fetch('https://api.docforge.io/render', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    html: '<h1>Hello, PDF.</h1>'
  })
})

const { pdf, pages } = await response.json()
// pdf = base64-encoded PDF ready to save or serve
Three steps. That's it.
Build your HTML however you want. We handle the rendering, and the PDF generation.
1

Build your HTML

Use your existing templates, CSS, and layout. Inline your styles or reference external fonts. DocForge renders exactly what you send.

2

POST to the API

Send your HTML to a single endpoint with your API key. Optionally configure paper size, margins, orientation, and headers/footers.

3

Get your PDF

Receive a base64-encoded PDF in the response body, along with page count, file size, and render time. Decode and serve or store.

Built for developers who have better things to do.
No SDKs. No config files. No Chromium binary to package. One API key, one request, one response, done.

Pixel-Perfect Rendering

Powered by headless Chromium. What you see in a browser is what you get in the PDF. CSS backgrounds, web fonts, page breaks — all supported.

Any Paper Format

Letter, Legal, A4, Tabloid, or custom dimensions. Portrait or landscape. Full-bleed or custom margins. You control the output.

Fast

Warm renders complete in under a second. Cold starts under 4 seconds. No queues, no webhooks, no polling — synchronous request/response.

Zero Infrastructure

No Chromium to install, no Puppeteer to configure, no container to deploy. You send HTML over HTTPS. We handle the rest.

External Resources

Reference Google Fonts, CDN-hosted images, and external stylesheets in your HTML. DocForge fetches and renders them during conversion.

Simple Auth

One API key in the x-api-key header. No OAuth flows, no tokens to refresh, no SDKs required.

Document Extraction

Send a PDF, Word (.doc or .docx), RTF, or text file and get back all of its text, ready for your app or your LLM. Same API key, same synchronous request/response.

Scanned PDFs, Too

Image-only and scanned PDFs are read with OCR automatically: DocForge detects which pages need it. Turn it off per request when you only want files with a text layer.

Meeting Transcripts

Drop in transcripts exported from Microsoft Teams, Zoom, or Google Meet (.vtt, .srt, .docx, .txt) and get the full conversation back as text.

Simple, predictable pricing.
Buy credits upfront. One credit per successful render or extraction. No subscriptions. Credits are good for a full year.

Starter

$10
$0.01 per credit
1,000 credits
  • All paper formats and orientations
  • Up to 4MB input (HTML or document)
  • Text extraction from PDF (incl. scanned), Word, RTF, text, and transcripts
  • External fonts and images
  • Credits valid for 365 days
Get Started

Scale

$500
$0.005 per credit
100,000 credits
  • Everything in Starter
  • 50% savings per credit
  • Credits valid for 365 days
Get Started
Get your API key.
Enter your email and we'll send you an API key. Start rendering PDFs and extracting text in minutes.