{"uid":"cap_yhaSgwVl0kD7bzNxl2-eB","slug":"print-api-html-to-pdf-document-renderer-d81df09a","name":"Print API – HTML-to-PDF Document Renderer","description":"Turn headings, paragraphs, lists and tables into a paginated, styled A4 or Letter PDF with page numbers. No remote assets or arbitrary scripts.","url":"https://print-api-production-a047.up.railway.app/v1/documents/render?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"paper":{"enum":["A4","Letter"],"type":"string","default":"A4"},"title":{"type":"string","maxLength":200,"minLength":1},"accent":{"type":"string","default":"#237b65","pattern":"^#[0-9a-fA-F]{6}$"},"author":{"type":"string","default":"","maxLength":100},"blocks":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"text":{"type":"string","maxLength":300,"minLength":1},"type":{"type":"string","const":"heading"},"level":{"enum":["h2","h3"],"type":"string","default":"h2"}},"additionalProperties":false},{"type":"object","required":["type","text"],"properties":{"text":{"type":"string","maxLength":4000,"minLength":1},"type":{"type":"string","const":"paragraph"}},"additionalProperties":false},{"type":"object","required":["type","items"],"properties":{"type":{"type":"string","const":"bullets"},"items":{"type":"array","items":{"type":"string","maxLength":1000,"minLength":1},"maxItems":30,"minItems":1}},"additionalProperties":false},{"type":"object","required":["type","headers","rows"],"properties":{"rows":{"type":"array","items":{"type":"array","items":{"anyOf":[{"type":"string","maxLength":500},{"type":"number"},{"type":"boolean"},{"type":"null"}]},"maxItems":12},"maxItems":200},"type":{"type":"string","const":"table"},"headers":{"type":"array","items":{"type":"string","maxLength":100,"minLength":1},"maxItems":12,"minItems":1}},"additionalProperties":false}]},"maxItems":60,"minItems":1},"footer":{"type":"string","default":"","maxLength":150},"subtitle":{"type":"string","default":"","maxLength":500}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8sUrSOzYs9pkX7n6y-6lE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts structured content blocks (headings, paragraphs, bullet lists, tables) into a paginated, styled A4 or Letter PDF document with page numbers and custom accent color.","exampleAgentPrompt":"Can you generate a styled A4 PDF titled 'Q2 Sales Report' by Jane Smith, with a teal accent color (#237b65), including a heading for 'Revenue Overview', a paragraph summarizing the quarter, a bullet list of top products, and a table of monthly figures — with a footer that says 'Confidential'?","exampleUseCases":[{"title":"Automated business report PDF","prompt":"Put together an A4 PDF titled 'Monthly Performance Report' authored by 'Analytics Team', with an accent color of #1a5276, containing an h2 heading 'Key Metrics', a paragraph summarizing last month's results, and a table of department KPIs — add a footer that says 'Internal Use Only'."},{"title":"Client proposal document","prompt":"Create a Letter-size PDF proposal titled 'Website Redesign Proposal' by 'Acme Agency', with a purple accent (#6c3483), including a subtitle 'Prepared for Globex Corp', an intro paragraph, a bullets block listing our three service tiers, and a pricing table with columns for Service, Hours, and Cost."},{"title":"Meeting agenda printout","prompt":"Generate an A4 PDF titled 'Team All-Hands Agenda — June 2025', no author needed, accent color #c0392b, with an h2 heading 'Agenda Items', a bullet list of the five topics we'll cover, and a closing paragraph with logistics info — put 'Do Not Distribute' in the footer."}],"resultDescription":"Returns a binary PDF file representing the fully paginated, styled document. The PDF includes a title page area with title, subtitle, and author; body content rendered from the provided blocks (headings, paragraphs, bullet lists, tables); automatic page numbering; and the specified accent color applied to headings and structural elements.","failureModes":["Missing required 'title' or 'blocks' fields returns a 422 validation error","Blocks array exceeds 60 items returns a validation error","Table rows exceed 200 or table has more than 12 columns returns a validation error","Bullet list exceeds 30 items returns a validation error","Invalid hex color format for 'accent' returns a validation error","Payment not included or insufficient returns a 402 Payment Required error","Title exceeds 200 characters or paragraph text exceeds 4000 characters returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need to programmatically generate a clean, paginated PDF document from structured textual content (headings, paragraphs, lists, tables) without needing arbitrary HTML/CSS rendering, remote image assets, or JavaScript execution. It is ideal for reports, proposals, agendas, and data summaries where the output must be print-ready A4 or Letter format with consistent styling. Prefer alternatives if you need to render arbitrary HTML, embed images or charts, or produce non-PDF formats like DOCX or HTML.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T18:31:13.917Z","isFirstParty":false,"canonicalSlug":"print-api-html-to-pdf-document-renderer-d81df09a"}