Pay-per-use · No subscriptions

Playwright as a Service — PDF API

We run Playwright so you don't have to. REST API, pay per render.

HTML2DocHub's rendering engine is built on Playwright with Chromium — the same technology Microsoft uses for Edge and many CI testing pipelines. Stop managing browser installations and get production-ready PDF generation via a clean REST API.

Why developers choose HTML2DocHub

Playwright/Chromium engine — same as local Playwright
No browser installation or playwright install command
No memory management or tab cleanup
Supports JavaScript execution and dynamic content
Network idle detection before capturing
Custom viewport, media emulation (print/screen)
Full Playwright PDF options: format, margins, background
Pay per page rendered — not per server hour

Code Examples

Before: Self-hosted Playwright Pythonpython
# BEFORE — Complex Playwright setup
from playwright.async_api import async_playwright

async with async_playwright() as p:
    browser = await p.chromium.launch()
    page = await browser.new_page()
    await page.set_content(html)
    await page.wait_for_load_state("networkidle")
    pdf_bytes = await page.pdf(
        format="A4",
        print_background=True,
        margin={"top": "2cm", "bottom": "2cm"},
    )
    await browser.close()
# Then store to S3, serve signed URL, handle errors...
After: HTML2DocHub API (simple)python
# AFTER — One function call
import requests

def html_to_pdf(html: str) -> str:
    resp = requests.post(
        "https://api.html2dochub.com/v1/render",
        headers={"X-API-Key": "sk_live_YOUR_KEY"},
        json={
            "type": "pdf",
            "html": html,
            "options": {
                "format": "A4",
                "print_background": True,
                "margin_top": "2cm",
                "margin_bottom": "2cm",
            },
        },
    )
    return resp.json()["download_url"]

Simple, transparent pricing

Pay only for pages rendered. No subscriptions. No minimum monthly fee.

1 page PDF:~₹0.10
10 page PDF:~₹0.80
100 pages/day:~₹8/day
See full pricing details

Frequently Asked Questions

Is this really Playwright under the hood?+
Yes. We use Playwright with Chromium to render all jobs. Any page that works with playwright.chromium.launch() will work with HTML2DocHub.
What about `waitForSelector` and network idle?+
We wait for `networkidle` by default, which is equivalent to `waitUntil: 'networkidle'` in Playwright. Custom wait options are available.
Can I inject custom JavaScript before capture?+
Yes — pass a `script` option with JavaScript to evaluate before rendering.

Start rendering PDFs today

Free account. No credit card required. API ready in minutes.

Get your free API key