PDF Document
Generate a branded PDF document (invoice, report, letter) from content only. Branding comes from the project PDF Layout. Returns a stored document with a signed download URL.
⚡ Built-in — No Setup Required
This integration is built into the WebsitePublisher platform. All endpoints are available immediately — no API key needed.
Endpoints (1)
POST
generate
Render a branded PDF from content and store it. The author supplies only content; layout/branding is applied automatically from the project PDF Layout.
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | ✓ Yes | Document title (heading). |
subtitle |
string | No | Optional subtitle under the title. |
image_url |
string | No | Optional hero/figure image URL shown at the top of the body. |
blocks |
array | No | Content blocks in order. Each: {"type":"text","content":"..."} or {"type":"table","headers":["A","B"],"rows":[["1","2"]]} or {"type":"image","url":"...","caption":"..."}. |
filename |
string | No | Optional file name / slug for the stored document (without .pdf). Defaults to a generated name. |
return_base64 |
boolean | No | If true, also return the PDF as base64 in the response (for inline download/preview). |
letterhead |
boolean | No | If true, strip all branding chrome (logo/company header, colored rule, note, footer) so the PDF prints on PRE-PRINTED stationery. A top margin is left blank for the pre-printed letterhead. |
letterhead_top_mm |
integer | No | Top margin in mm to reserve for the pre-printed letterhead (only used when letterhead=true). Default 45. |
store |
boolean | No | Whether to archive the PDF to the documents bucket (do-private). Default true. Set false to render in-memory and return ONLY base64 without persisting anything (e.g. for an email attachment). |
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| generate | pdf_document_generate |
Website