# Puptra PDF Snapshot — URL/HTML to PDF

> Puptra PDF Snapshot — URL/HTML to PDF is a paid API for AI agents from puptra-pdf-snapshot.saastemly.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-11).

Renders a URL or raw HTML to a PDF file using Puppeteer's page.pdf() with full control over format, scale, margins, header/footer templates, background printing, and page ranges.

## Facts

- Endpoint: POST https://puptra-pdf-snapshot.saastemly.com/v1/pdf?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/puptra-pdf-snapshot-url-html-to-pdf-7a80f154
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Mc_RK1tmECwAG2TU5aTAS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability puptra-pdf-snapshot-url-html-to-pdf-7a80f154 -d '<json body>'
```

Example prompt: Convert https://reports.example.com/annual-2024 to a PDF in letter format with a 1-inch margin on all sides, print the background colors, and add a footer showing the page number — give me the PDF back.

## When to prefer this

Choose this endpoint when you need a full-fidelity, print-ready PDF from a URL or HTML string with fine-grained control over Puppeteer's page.pdf() options — especially when you need custom headers/footers, specific margins, background printing, or page range selection. Prefer over screenshot endpoints when the output must be a document (PDF) rather than an image.

## Known failure modes

- URL unreachable or returns non-200 — PDF generation fails with a fetch/navigation error
- Invalid HTML passed — Puppeteer may render a blank or broken PDF
- Invalid pageRanges format — returns a 400 bad request
- Timeout if the target page is slow to load or has heavy JavaScript
- Unsupported format value — may default to letter or return a validation error
- Missing required URL or HTML body — returns a 400 missing parameter error

## How this service works

Render a URL or HTML to PDF with Puppeteer's page.pdf() options (format letter by default, scale, margins, header/footer templates, printBackground, pageRanges).

## Output

A PDF file (binary or base64-encoded) of the rendered page, produced by Puppeteer's page.pdf() with the requested options such as format, scale, margins, header/footer HTML templates, printBackground, and pageRanges.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "type": "string",
   "description": "The page to render (https). Set url or html, not both."
  },
  "html": {
   "type": "string",
   "description": "HTML to render instead of a URL."
  },
  "cookies": {
   "type": "array",
   "description": "Cookies to set before loading"
  },
  "deliver": {
   "type": "object",
   "description": "{store: \"1d\"|\"7d\"|\"30d\"|\"365d\", name?}: keep the PDF in file storage and answer with metadata instead of bytes"
  },
  "viewport": {
   "type": "object",
   "description": "{width,height,deviceScaleFactor,isMobile,hasTouch,isLandscape}; default 1920x1080"
  },
  "userAgent": {
   "type": "string"
  },
  "pdfOptions": {
   "type": "object",
   "properties": {
    "scale": {
     "type": "number",
     "description": "0.1-2, default 1"
    },
    "width": {
     "type": "string",
     "description": "Paper width, e.g. \"8.5in\""
    },
    "format": {
     "type": "string",
     "description": "letter|legal|tabloid|ledger|a0|a1|a2|a3|a4|a5|a6 (default letter)"
    },
    "height": {
     "type": "string",
     "description": "Paper height, e.g. \"11in\""
    },
    "margin": {
     "type": "object",
     "description": "{top,bottom,left,right}"
    },
    "tagged": {
     "type": "boolean"
    },
    "outline": {
     "type": "boolean"
    },
    "timeout": {
     "type": "number",
     "description": "0-60000 ms, default 30000"
    },
    "landscape": {
     "type": "boolean"
    },
    "pageRanges": {
     "type": "string",
     "description": "e.g. \"1-5, 8, 11-13\""
    },
    "footerTemplate": {
     "type": "string"
    },
    "headerTemplate": {
     "type": "string",
     "description": "HTML with date/title/url/pageNumber/totalPages classes"
    },
    "omitBackground": {
     "type": "boolean"
    },
    "printBackground": {
     "type": "boolean"
    },
    "preferCSSPageSize": {
     "type": "boolean"
    },
    "displayHeaderFooter": {
     "type": "boolean"
    }
   },
   "description": "Puppeteer page.pdf() options as documented at pptr.dev/api/puppeteer.pdfoptions."
  },
  "addStyleTag": {
   "type": "array",
   "description": "[{content|url}]"
  },
  "bestAttempt": {
   "type": "boolean",
   "description": "Proceed when awaited events fail or time out"
  },
  "gotoOptions": {
   "type": "object",
   "description": "{waitUntil: load|domcontentloaded|networkidle0|networkidle2, timeout}"
  },
  "addScriptTag": {
   "type": "array",
   "description": "[{conte
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/puptra-pdf-snapshot-url-html-to-pdf-7a80f154/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from puptra-pdf-snapshot.saastemly.com](https://www.zero.xyz/host/puptra-pdf-snapshot.saastemly.com/llms.txt)
