generate_document_single
Generate a single document from a template by supplying template file and data, then save the result as PDF, DOCX, or HTML.
Instructions
Generate a single document from a template using PDF4me GenerateDocumentSingle API (POST /api/v2/GenerateDocumentSingle). Supports template file, document data text/file, output type, and async polling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| output_dir | Yes | Directory to save output (required). | |
| output_type | Yes | One of backend-supported values: PDF, Docx, Html. | |
| file_meta_data | No | Optional fileMetaData string. | |
| meta_data_json | No | Optional metaDataJson string. | |
| output_file_name | Yes | Output file name (required). | |
| document_data_type | Yes | One of backend-supported values: Json, XML, or Text (plain text data). | |
| template_file_name | Yes | Template file name sent to API. | |
| template_file_path | Yes | Local path to template file (html/docx/pdf/etc). | |
| template_file_type | Yes | One of backend-supported values: Docx, Html, Pdf, MailMerge, GoogleDocs. | |
| document_data_file_path | No | Local data file path to send as base64 documentDataFile. | |
| document_data_text_path | No | Local path to text data (JSON/XML text) for documentDataText. |