Buat dokumen (Tunggal)
Hasilkan dokumen secara dinamis menggunakan aksi Generate Document PDF4me untuk API. Gunakan template Word, HTML, atau PDF dengan sintaks mustache atau bidang gabungan sebagai sumber. Sumber data dapat berupa JSON atau XML. Anda perlu mengulang aksi dan mengulangi data untuk menghasilkan beberapa dokumen.
Parameter
- Jenis file templateEnum, RequiredDefault: DOCX
Template file type.
- Word - Set this value when sending a Word template
- HTML - Set this value when sending an HTML template
- PDF - Set this value for a PDF template
- Nama file templateString, Required
Name of the Template with the proper file extension
- 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
Output
- Konten fileBinary
The Output file from the Generate Document action
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