generate_document
Generate documents in PDF, DOCX, or ODT format from HTML or Markdown content. Optionally apply templates, replace fields, and overlay a diagonal watermark.
Instructions
Generate a document with optional template, fields, and watermark.
Args: html_content: HTML content for the document body. markdown_content: Markdown content (alternative to HTML). template_name: Name of a pre-uploaded template (ODT/DOCX). fields: Template field replacements (key-value pairs). watermark: Diagonal watermark text overlay. output_format: Output format – PDF, DOCX, or ODT (default: PDF).
Returns: Base64-encoded document bytes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html_content | No | ||
| markdown_content | No | ||
| template_name | No | ||
| fields | No | ||
| watermark | No | ||
| output_format | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |