Create PDF Document
pdf-documentCreate PDF documents with automatic pagination for reports, articles, contracts, and sequential content. Supports text, headings, images, dividers, and page breaks with customizable formatting and page setup.
Instructions
Create a flowing PDF document with automatic pagination.
Best for: Reports, articles, letters, contracts, and documents with sequential content.
Content flows naturally from top to bottom. Pages break automatically when content exceeds page height. Use "pageBreak" to force page breaks, "divider" for horizontal rules, and "spacer" for vertical spacing.
Supported content types:
text: Body text with optional formatting (bold, italic, color, alignment)
heading: Section headings (larger font, bold by default)
image: Inline images that flow with content
divider: Horizontal line separators
spacer: Vertical whitespace
pageBreak: Force new page
Default margins: Varies by page size (e.g., 72pt/1" for Letter, ~56pt for A4).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | Optional logical filename (metadata only). Storage uses UUID. Defaults to "document.pdf". | |
| title | No | Document title metadata | |
| author | No | Document author metadata | |
| font | No | Font strategy (default: auto). Built-ins: Helvetica, Times-Roman, Courier. Use a path or URL for Unicode. | |
| pageSetup | No | Page configuration including size, margins, and background color. | |
| content | Yes | Document content in flow order |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |