Usage Instructions
Generate PDF documents from text or markdown content. Supports headers, bold text, bullet lists, page sizing, headers/footers, and page numbers.
Actions
Generate PDF
Generate a PDF document from text or markdown content
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The content to render in the PDF. Supports plain text with line breaks and basic markdown-style headers (# H1, ## H2, ### H3), bold (text), bullet lists (- item), and horizontal rules (---). |
filename | string | No | The filename for the generated PDF (without .pdf extension). Defaults to "document". |
title | string | No | Title displayed prominently at the top of the PDF document. |
pageSize | string | No | Page size: "a4", "letter", or "legal". |
orientation | string | No | Page orientation: "portrait" or "landscape". |
margin | number | No | Page margin in points (1 inch = 72 points). Default is 50. |
fontSize | number | No | Font size in points. Default is 12. |
headerText | string | No | Header text displayed at the top of each page. |
footerText | string | No | Footer text displayed at the bottom of each page. Use {{page}} for page number and {{pages}} for total pages. |
pageNumbers | boolean | No | Whether to include page numbers in the footer (e.g., "Page 1 of 3"). |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the PDF generation succeeded |
output | object | Generated PDF output |
↳ file | file | The generated PDF file |
↳ pageCount | number | Number of pages in the generated PDF |
↳ filename | string | The filename of the generated PDF |