{"uid":"cap_C1XCfoTJVxlrX2gkjaISK","slug":"402utils-html-url-to-pdf-renderer-155d9d98","name":"402utils HTML/URL to PDF Renderer","description":"Render HTML or a public web page into a pixel-perfect PDF using a headless Chrome browser. Send inline `html` (invoices, receipts, reports, tickets) or a `url` to snapshot; control paper size, orientation, margins, background graphics and scale. Returns the raw application/pdf bytes — no signup, no browser to run, pay per document.","url":"https://402utils.com/v1/pdf?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Public http(s) URL to render. Mutually exclusive with html."},"html":{"type":"string","description":"Inline HTML document to render (max 1 MB). Mutually exclusive with url."},"scale":{"type":"number","maximum":2,"minimum":0.5,"description":"Render scale factor."},"format":{"enum":["A4","Letter","Legal"],"type":"string","default":"A4","description":"Paper size."},"margin":{"type":"object","properties":{"top":{"type":"number"},"left":{"type":"number"},"right":{"type":"number"},"bottom":{"type":"number"}},"description":"Page margins in millimetres (0–100 each)."},"landscape":{"type":"boolean","default":false,"description":"Landscape orientation."},"waitUntil":{"enum":["load","networkidle"],"type":"string","default":"load","description":"When to consider the page ready. Use 'networkidle' for JS-heavy pages."},"printBackground":{"type":"boolean","default":true,"description":"Print CSS background colours and images."}}},"responseSchema":{"type":"json","example":"<binary application/pdf stream>"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":{"p10Cents":"1.0000","medianCents":"1.0000","p90Cents":"1.0000","minCents":"1.0000","maxCents":"1.0000","p95Cents":"1.0000","sampleCount":1,"varies":false,"failureChargeRate":1},"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_EJx7IIaMPGYxV026GqoEA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts inline HTML or a public web URL into a pixel-perfect PDF using headless Chrome, returning raw PDF bytes","exampleAgentPrompt":"Convert this HTML invoice into an A4 PDF with 10mm margins on all sides, landscape orientation, and make sure background colors are included: <html>...</html>","exampleUseCases":null,"resultDescription":"Raw application/pdf binary bytes representing the rendered document — ready to save, stream, or attach to an email. No wrapper JSON, just the PDF file content.","failureModes":["HTML exceeds 1 MB limit — request rejected","URL is not publicly accessible or returns non-200 — rendering fails","Invalid paper format enum value — validation error","Margin values outside 0–100mm range — validation error","Scale factor outside 0.5–2.0 range — validation error","Both url and html provided simultaneously — mutually exclusive fields error","JS-heavy page not fully rendered — use waitUntil: networkidle instead of load","Payment not processed via x402 — 402 Payment Required response"],"whenToPreferThis":"Choose this endpoint when you need server-side, headless-Chrome-quality PDF rendering without running your own browser infrastructure. Ideal for generating invoices, receipts, reports, and tickets from HTML templates or snapshotting live web pages as PDFs. Preferred over client-side PDF libraries when pixel-perfect CSS fidelity and background graphics matter, and over full browser automation when you just need a single-document render at $0.01 per call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:42:20.055Z","isFirstParty":false,"canonicalSlug":"402utils-html-url-to-pdf-renderer-155d9d98"}