PDFPipe

Use case

URL to PDF API

Convert any public URL to a PDF with one POST request. The renderer executes JavaScript, waits for async content, and captures the fully rendered page.

Full JavaScript execution

The renderer runs a real browser. JavaScript, async data loading, WebFont APIs, and canvas renders all complete before the PDF is captured.

Wait for async content

Use wait_for: '#selector' to pause until your SPA or dashboard has finished rendering. Combine with wait_ms for an extra settle window.

SSRF protected

Private addresses, link-local ranges, and non-public hostnames are blocked before the request is even made. You cannot accidentally proxy your internal network.

Inject print CSS

Use inject_css to override the page's screen styles with print-specific tweaks: remove headers, hide banners, adjust font sizes.

Store and archive

Add store: true to get a stable URL back instead of raw bytes. Archive rendered pages, send links via email, or save the URL to your database.

No quota burn on failure

If the URL is unreachable, the page returns an error, or the render times out, the document is not counted against your quota.

Basic conversion

Pass url instead of html. The renderer navigates to the URL, waits for all network activity to settle, then captures the PDF.

Node.js
// Convert a public URL to PDF

const resp = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/report",
    options: {
      format: "A4",
      print_background: true,
      wait_until: "networkidle0",   // wait for JS and async resources
    },
  }),
});

if (!resp.ok) throw new Error(`Failed: ${resp.status}`);
const pdf = new Uint8Array(await resp.arrayBuffer());
curl
# Minimal curl example — no SDK needed
curl -X POST https://api.pdfpipe.xyz/v1/pdf \
  -H "Authorization: Bearer $PDFPIPE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com","options":{"format":"A4"}}' \
  --output document.pdf

Wait for JavaScript-rendered content

SPAs and analytics dashboards render data asynchronously. Use wait_for to pause until a specific DOM element appears, and wait_ms for an extra settle window after the selector is found.

Node.js
// Wait for a specific element before rendering
// Useful for SPAs or dashboards that render async data

const resp = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://yourapp.com/reports/q3",
    options: {
      format: "A4",
      landscape: true,
      print_background: true,
      wait_for: "#chart-container.loaded",  // wait for a CSS selector
      wait_ms: 500,                          // extra settle time in ms
      timeout_ms: 45000,                     // raise timeout for slow pages
    },
  }),
});

Store the conversion

When store: true is set, the response is JSON with a stable document_url instead of raw bytes.

Node.js
// Archive the PDF and return a stable URL

const resp = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    url: "https://example.com/invoice/123",
    store: true,
    filename: "invoice-123.pdf",
    options: {
      format: "A4",
      print_background: true,
    },
  }),
});

const { document_url, document_id } = await resp.json();
// document_url is a stable link you can save to your DB or email

URL rendering options

OptionValuesNotes
wait_untilnetworkidle0 | networkidle2 | load | domcontentloadednetworkidle0 (safest for SPAs)
wait_forCSS selector stringWait for selector to appear before rendering
wait_msinteger (max 5000)Additional settle time in milliseconds after page load
timeout_msinteger (1000–60000)Total render timeout in milliseconds
formatA4 | Letter | A3 | A5 | Legal | TabloidPage size
landscapebooleanLandscape orientation
print_backgroundbooleanInclude CSS background colors and images
inject_cssCSS stringAdd print-override styles after the page loads

URL rendering has the same options as HTML rendering, except inject_css and wait_for apply after the page has loaded. See the full API reference for all options.

Start converting URLs to PDFs

500 conversions a month free. No credit card. API key issued instantly after signup.

Related use case

Report PDF API →

Related guide

PDF in Node.js →

All use cases

Use cases index →