{"uid":"cap_Mc_RK1tmECwAG2TU5aTAS","slug":"puptra-pdf-snapshot-url-html-to-pdf-7a80f154","name":"Puptra PDF Snapshot — URL/HTML to PDF","description":"Render a URL or HTML to PDF with Puppeteer's page.pdf() options (format letter by default, scale, margins, header/footer templates, printBackground, pageRanges).","url":"https://puptra-pdf-snapshot.saastemly.com/v1/pdf?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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":"[{content|url}]"},"authenticate":{"type":"object","description":"{username,password}"},"waitForTimeout":{"type":"number","description":"Extra wait in ms (0-120000)"},"waitForSelector":{"type":"object","description":"{selector, visible?, hidden?, timeout}"},"emulateMediaType":{"type":"string","description":"screen|print"},"allowResourceTypes":{"type":"array"},"allowRequestPattern":{"type":"array"},"rejectResourceTypes":{"type":"array","description":"e.g. [\"image\"]"},"setExtraHTTPHeaders":{"type":"object","description":"Extra HTTP headers"},"rejectRequestPattern":{"type":"array"},"setJavaScriptEnabled":{"type":"boolean"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_vw-FUv6Dqbr2EHrc3puNV","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Invoice PDF from HTML template","prompt":"Take this HTML invoice template and render it as a PDF with letter format, 0.5-inch margins, and the company logo in the header — I need the PDF file to send to my client."},{"title":"Web report archival as PDF","prompt":"Convert https://dashboard.myapp.com/monthly-report/march to a PDF with background colors printed and page range 1-5, using A4 format, so I can archive it."},{"title":"Printable document with custom header/footer","prompt":"Render https://docs.example.com/user-guide as a letter-format PDF at 0.8 scale with a header showing 'User Guide v2' and a footer with the page number on each page."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T12:35:24.011Z","isFirstParty":false,"canonicalSlug":"puptra-pdf-snapshot-url-html-to-pdf-7a80f154"}