Rendex
Use Case

Convert Any URL to a PDF with a Single API Call

Pass a URL or raw HTML — get back a pixel-perfect PDF. Configurable page size, margins, headers, and footers. Generate reports, invoices, and archives without running a browser.

The Problem

Converting webpages to PDFs programmatically means managing headless browsers, handling dynamic content loading, configuring print stylesheets, and dealing with pagination edge cases. Self-hosted solutions require significant infrastructure and operational overhead, especially at scale.

The Solution

Rendex converts any URL or raw HTML to PDF on Cloudflare's edge. One API call with full control over page size, margins, orientation, headers, and footers. No Chromium install, no print stylesheet debugging, no infrastructure.

See it in action

A request body with a live URL and format: pdf on the left, rendered by Rendex into a print-ready, multi-page A4 PDF with a running page footer on the right.

Get Started in Minutes

url_to_pdf.py
from rendex import Rendex
from pathlib import Path

rendex = Rendex("YOUR_API_KEY")

result = rendex.screenshot(
    url="https://example.com/report",
    format="pdf",
    pdf_format="A4",
    pdf_margin={"top": "20mm", "right": "20mm", "bottom": "20mm", "left": "20mm"},
    pdf_print_background=True,
)

Path("report.pdf").write_bytes(result.image)
print(f"PDF generated: {result.metadata.bytes_size} bytes")
url-to-pdf.js
import Rendex from "@copperline/rendex";
import { writeFileSync } from "fs";

const rendex = new Rendex("YOUR_API_KEY");

const result = await rendex.screenshot({
  url: "https://example.com/report",
  format: "pdf",
  pdfFormat: "A4",
  pdfMargin: { top: "20mm", right: "20mm", bottom: "20mm", left: "20mm" },
  pdfPrintBackground: true,
});

writeFileSync("report.pdf", Buffer.from(result.image));
url-to-pdf.sh
curl -X POST https://api.rendex.dev/v1/screenshot \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/report",
    "format": "pdf",
    "pdfFormat": "A4",
    "pdfMargin": { "top": "20mm", "right": "20mm", "bottom": "20mm", "left": "20mm" },
    "pdfPrintBackground": true
  }' --output report.pdf

100 free API calls/month — no credit card required. Get your API key and start building.

Built for This Use Case

URL or HTML Input

Convert any public URL or pass raw HTML directly. Both paths produce identical high-quality PDF output.

Page Configuration

Control page size (A4, Letter, Legal, custom), margins, orientation (portrait/landscape), and scale factor.

Edge Rendering

PDFs rendered on Cloudflare's 300+ edge locations. Sub-3-second generation with zero cold starts.

Print Backgrounds

Preserve background colors, gradients, and images in the PDF. Captures the page exactly as it appears in the browser.

Batch PDF Generation

Generate up to 500 PDFs in a single batch request. Process invoices, reports, or certificates in parallel.

Geo-Targeted Capture

Render pages as seen from 50+ countries on Pro and Enterprise plans. Capture localized content, pricing, and language for region-specific PDFs.

Start Free, Scale as You Grow

100 calls/month free. Starter at $69/mo for 10K calls (or $58/mo billed annually — 2 months free). Pro at $179/mo for 100K calls.

Frequently Asked Questions

Related Resources