{"uid":"cap_ui0WS1ZVGCBodbJ2AFHDs","slug":"x402-agentutility-html-to-pdf-converter-b0dad6b6","name":"x402 AgentUtility HTML-to-PDF Converter","description":"Render a live webpage as a PDF document. Send a url plus optional page_format, orientation, margins, and a wait_until condition for JS-heavy pages, and it captures the rendered page through CloudConvert and returns a pdf_url with the file size in bytes. Use it as a URL to PDF converter, webpage-to-PDF capture tool, or website screenshot to PDF generator for archiving or reporting pages.","url":"https://x402.agentutility.ai/html-to-pdf?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["url"],"properties":{"url":{"type":"string","description":"URL to render and capture as a PDF. Must be http or https."},"margin_top":{"type":"number","description":"Optional. Top margin in inches, 0-5."},"wait_until":{"type":"string","description":"Optional. Load condition before capture: 'load', 'domcontentloaded', 'networkidle0', or 'networkidle2'."},"page_format":{"type":"string","description":"Optional. Page size, e.g. 'a4', 'letter', 'legal', 'tabloid', 'a0'-'a6'."},"margin_bottom":{"type":"number","description":"Optional. Bottom margin in inches, 0-5."},"page_orientation":{"enum":["portrait","landscape"],"type":"string","description":"Optional. 'portrait' or 'landscape'."},"print_background":{"type":"boolean","description":"Optional. Include background graphics. Default false."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"pdf_url":{"type":"string"},"file_size_bytes":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"pdf_url":"https://...pdf","file_size_bytes":20350}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.08","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.08/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.08","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_aEsA34M2gSvjF67VeOstP","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.08","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Renders a live webpage as a PDF document by capturing its fully-rendered state via CloudConvert and returning a downloadable PDF URL with file size.","exampleAgentPrompt":"Can you convert this webpage to a PDF for me — https://example.com/report — using A4 format, landscape orientation, and wait for all JavaScript to finish loading before capturing it?","exampleUseCases":[{"title":"Archive a news article as PDF","prompt":"Save this news article as a PDF so I can read it later offline — here's the URL: https://techcrunch.com/2024/05/01/ai-breakthrough. Use A4 format, portrait orientation, and make sure any lazy-loaded content is fully rendered before capturing."},{"title":"Export a dashboard report to PDF","prompt":"Convert my analytics dashboard page at https://dashboard.mycompany.com/q1-report to a PDF in landscape orientation on A4 paper, and wait until all the charts have finished loading before you capture it."},{"title":"Generate a PDF invoice from a web page","prompt":"Turn this hosted invoice page at https://invoices.myservice.com/inv-4892 into a PDF document — use letter format, portrait orientation, and standard margins so it looks clean for sending to a client."}],"resultDescription":"Returns a pdf_url pointing to the generated PDF file hosted by CloudConvert, along with the file size in bytes. The PDF reflects the fully rendered state of the page at the time of capture, including JavaScript-rendered content if a wait_until condition was specified.","failureModes":["Invalid or unreachable URL returns an error with no PDF generated","Page fails to render within timeout causing an incomplete capture","Unsupported page_format or orientation value returns a validation error","JavaScript-heavy pages may render incompletely if wait_until condition is not set appropriately","Payment failure via x402 protocol prevents the request from being processed"],"whenToPreferThis":"Choose this endpoint when you need to capture a fully rendered, JavaScript-heavy webpage as a high-quality PDF, especially when precise formatting controls (page format, orientation, margins) matter. It is particularly well-suited for archiving dynamic dashboards, reports, or invoices rendered in the browser. Prefer it over simpler screenshot tools when a structured PDF output with configurable layout is required and you are comfortable with USDC-based x402 micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T06:51:42.727Z","isFirstParty":false,"canonicalSlug":"x402-agentutility-html-to-pdf-converter-b0dad6b6"}