Skip to content

Generate PDF documents from HTML and CSS with a simple REST API

Create professional PDF/A and PDF/UA compliant documents from your HTML templates. Meet the European Accessibility Act requirements with our cloud-based PDF generation service.
PDF generation illustration

Our Services

Choose the right PDF generation approach for your needs.
Premium

HTML to PDF (WeasyPrint)

PDF/A and PDF/UA compliant. Recommended for commercial and accessible documents. CSS-based layout engine.

HTML to PDF (wkhtmltopdf)

Lightweight and fast. Full JavaScript support for dynamic content. Great for screen-capture style PDFs.

PDF/A & PDF/UA Compliance

European Accessibility Act ready. Generate archival and universally accessible PDF documents from HTML.

PDF Utilities

Merge, split, overlay text, and convert PDF pages to images. All via simple REST API calls.

See It in Action

Generate a PDF from HTML with a single API call. Copy the example below and try it.
# First, get an access token using your client credentials
ACCESS_TOKEN=$(curl -s -X POST https://login.pdfbroker.io/connect/token \
  -d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET" \
  | jq -r '.access_token')

# Then, generate a PDF from HTML using WeasyPrint (PDF/A & PDF/UA compliant)
HTML_BASE64=$(echo '<h1>Hello World</h1><p>Generated with PdfBroker.io</p>' | base64)
curl -X POST https://api.pdfbroker.io/api/pdf/weasyprint \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"htmlBase64String\": \"$HTML_BASE64\"}" \
  --output document.pdf
// Install: dotnet add package PdfBroker.Client
using PdfBroker.Client;

// Authenticates automatically using OAuth2 client credentials
var client = new PdfBrokerClientService("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");

var html = "<h1>Hello World</h1><p>Generated with PdfBroker.io</p>";
var htmlBase64 = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(html));

// Generate a PDF/A and PDF/UA compliant PDF using WeasyPrint
byte[] pdf = await client.WeasyPrintAsByteArrayAsync(
    new { htmlBase64String = htmlBase64 });
await File.WriteAllBytesAsync("document.pdf", pdf);
import base64, requests

# Step 1: Get an access token using client credentials
token_resp = requests.post("https://login.pdfbroker.io/connect/token", data={
    "grant_type": "client_credentials",
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET",
})
access_token = token_resp.json()["access_token"]

# Step 2: Generate a PDF/A & PDF/UA compliant PDF using WeasyPrint
html = "<h1>Hello World</h1><p>Generated with PdfBroker.io</p>"
resp = requests.post(
    "https://api.pdfbroker.io/api/pdf/weasyprint",
    headers={"Authorization": f"Bearer {access_token}"},
    json={"htmlBase64String": base64.b64encode(html.encode()).decode()},
)
with open("document.pdf", "wb") as f:
    f.write(resp.content)

How It Works

Get started in three simple steps.
1

Sign Up

Create your free account and get your API credentials. No credit card required.

2

Design Your Template

Use the PdfBroker Template Tool or write HTML and CSS directly.

3

Call the API

Send your HTML to the REST API and receive a PDF document in response. It's that simple.

Already using XSL-FO? We've got you covered

PdfBroker.io supports XSL-FO to PDF rendering, including XSLT transformation. If your workflow relies on XSL-FO, you can use our API without changing your templates.

Explore XSL-FO Documentation

Pricing

Start free and scale as you grow.

Developer

Free
200 requests / month
  • wkhtmltopdf HTML to PDF
  • PDF Utilities (merge, split, overlay)
  • WeasyPrint HTML to PDF
  • PDF/A & PDF/UA Compliance

Basic

8.95 / mo
1,500 requests / month
  • wkhtmltopdf HTML to PDF
  • PDF Utilities (merge, split, overlay)
  • WeasyPrint HTML to PDF
  • PDF/A & PDF/UA Compliance

Professional

29.99 / mo
20,000 requests / month
  • wkhtmltopdf HTML to PDF
  • PDF Utilities (merge, split, overlay)
  • WeasyPrint HTML to PDF
  • PDF/A & PDF/UA Compliance

Enterprise

99.99 / mo
100,000 requests / month
  • wkhtmltopdf HTML to PDF
  • PDF Utilities (merge, split, overlay)
  • WeasyPrint HTML to PDF
  • PDF/A & PDF/UA Compliance

HTML Premium services (WeasyPrint with PDF/A and PDF/UA) require Basic plan or above.

View all plans & details

Get started in no time

Create your free account and generate your first PDF in minutes.
Sign Up Free