Aspose word with Java for service

I have a configuration(yml/json/xml) which tells me what type of action needs to done, like replace, remove, table, merge, etc. I’ll have placeholders in my static file which will be used to replaced, dynamically will compute the default value, mapping via config. what’s the ideal approach for this type of problem?

@nileshmishra If I understand your requirements properly, you need to fill the template with data, i.e. replace placeholders with some data from your data source. If so, in Aspose.Words you can use different approaches to fill template with data, for example Mail Merge or LINQ Reporting Engine.

Not just replace, it will be computed dynamically based on the object model (custom). Like if the value is available, we’ll replace else we’ll remove the section or table or whatever type it is.
Also, when should we go for the regular replace (via custom callback) and mail merge?

@nileshmishra Regular replace (via custom callback) is not the best way to fill the template with data.

You can use conditions in both Mail Merge and LINQ Reporting templates. So you can conditionally show or hide part of the template. In case of mail Merge, you can use regular MS Word IF field. In case of using LINQ Reporting Engine, you can use conditional blocks.