We recently discover your different products and are trying to determine the faisaibility of a feature.
In our data model, we have a lot of string collections (arrays) and we want to format them like this:
But our question is, can we avoid to repeat this kind of logic for each collection that we have ?
We tried to create a static method and referenced the class in “DocumentAssembler.knowTypes”, but we do not receive directly a collection of strings but an object from your model representing the iteration.
Then the source code is also as simple as examples provided in your documentation:
final String strDocumentTemplate = "in.docx";
final String strDocumentReport = "out.docx";
final JsonDataSource datasource = new JsonDataSource(new FileInputStream(strDirectoryPath + "datasources/data.json"));
final DataSourceInfo dataSourceInfo = new DataSourceInfo(datasource);
final DocumentAssembler assembler = new DocumentAssembler();
assembler.assembleDocument(
strDirectoryPath + strDocumentTemplate,
strDirectoryPath + strDocumentReport,
dataSourceInfo
);
Please note that we are using GroupDocs Assembly v22.2.