Hi,
Currently we are using word template with merge field and generate PDF for email.
Can we generate a PDF using PDF template? This will help to retain formatting which we get from customer. Please let me know which aspose version support this and how to implement?
@centris.aspose
If I understand you correctly, then the PostDocumentTextReplace method will suit you. With its help you can replace text keys in a PDF template.
Thanks for your reply
currently we are using Aspose Words with a merge template that incorporates looping merge fields, specifically designed for Word document processing.
we are exploring the possibility of achieving similar functionality with PDF templates and converting these directly to PDF output. Could you please let us know if Aspose offers support for merge templates with looping fields for direct PDF to PDF conversion? Specifically, I am looking for a solution that would allow me to dynamically populate data within a PDF template that has foreach loops.
@centris.aspose
Please specify which Aspose Words api method you are using, please attach the template and result file as well. Provide an example of the data you want to use to fill out the template and attach a pdf document that you want to use as a template.
We are currently using the POST /words/{name}/mailMerge method from the Aspose Words API (https://api.aspose.com/v1.1/words/) to perform mail merge operations. This method allows us to populate document templates dynamically using JSON data. Attached below are both the document template and the generated output document.
Test Merge Template.docx (2.7 KB)
Test Merge Template -Merged.PDF (58.7 KB)
Here is an example of the JSON data used to populate the template:
{
“dataSourceList”: {
“GenerateMergeDocumentDataSource”: {
“confirmedLocation”: [
{
“zipCode”: null,
“state”: null,
“roomName”: null,
“phoneNumber”: “9876”,
“name”: “Test”,
“country”: null,
“contactName”: “TEST”,
“city”: null,
“addressLine3”: null,
“addressLine2”: null,
“addressLine1”: null
}
]
}
}
}
we are looking for an API method that supports merging PDF templates directly (PDF-to-PDF merge).
@centris.aspose
No, there is no such option for direct PDF to PDF conversion.