Dokument generieren (Einzeln)
Generieren Sie dynamisch ein Dokument mit der PDF4me Generate Document Aktion für die API. Verwenden Sie Word-, HTML- oder PDF-Vorlagen mit Mustache-Syntax oder Seriendruckfeldern als Quelle. Die Datenquellen können JSON oder XML sein. Sie müssen die Aktion in einer Schleife ausführen und die Daten durchlaufen, um mehrere Dokumente zu generieren.
Parameter
- Vorlagen-DateitypEnum, RequiredDefault: DOCX
Vorlagen-Dateityp.
- Word - Setzen Sie diesen Wert beim Senden einer Word-Vorlage
- HTML - Setzen Sie diesen Wert beim Senden einer HTML-Vorlage
- PDF - Setzen Sie diesen Wert für eine PDF-Vorlage
- Vorlagen-DateinameString, Required
Name der Vorlage mit der entsprechenden Dateierweiterung
- Templare File DataBase64, Required
Map the Template file content
- Document Data TypeEnum, RequiredDefault: JSON
The data type for the template
- JSON
- XML
- Document Data FileBase64, Required
Map the Data file for the Template
- Document Data TextString
It is required only if the Data file is not mapped. You can manually enter the Data for the template in JSON or XML format.
- File Meta DataString
Any additional Metadate for fields in JSON format
- Output TypeEnum, RequiredDefault: DOCX
The file format of the Generated Document
- Word
- Excel
- HTML
- Meta Data JsonString, Required
Ausgabe
- DateiinhaltBinary
Die Ausgabedatei aus der Generate Document Aktion
Header
Content-Type:application/json
Authorization: Please copy key from the link.
Payload
{
"templateFileType": "file.pdf",
"templateFileName": "fileName.pdf",
"templateFileData": "US",
"documentDataType": "text",
"outputType": "output.pdf",
"documentDataFile": "test2",
"documentDataText": "Elon",
"metaDataJson": "abc"
}
PDF4me api samples
- CSharp(C#)
- Java
- JavaScript
- Python
- Salesforce
- n8n
- Google Script
- AWS Lambda