We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

IF-ELSE Mustache Template Syntax Example

Can you also share these files with me. We are facing similar problems. Thanks in advance.

@HarryAspose,

Regarding the if-else ‘Mustache’ template syntax example, please see the sample input, output documents and screenshot in this archive (Mustache-Template-Syntax.zip (38.5 KB)) and try running the following code:

Document doc = new Document("E:\\Mustache-Template-Syntax\\input.docx");
doc.getMailMerge().setUseNonMergeFields(true);
doc.getMailMerge().execute(new String[]{"GENDER"}, new Object[]{"MALE"});
doc.save("E:\\Mustache-Template-Syntax\\awjava-18.12.docx");

A post was split to a new topic: ‘Mustache’ template syntax example