Currently we have given the below code in the word template: (value1 and value 2 are in different columns of a table). <<foreach [ result in Row]>> | <<[result.value1]>> | <[ result.value2]>> <</foreach>>
The java code for pdf generation is given below,
Document doc = new Document(dataDir + fileName);
ReportingEngine engine = new ReportingEngine();
PdfSaveOptions options = new PdfSaveOptions();
options.getOutlineOptions().setDefaultBookmarksOutlineLevel(1);
options.getOutlineOptions().setDefaultBookmarksOutlineLevel(2);
DataSet ds = new DataSet();
ds.readXml(dataDir+"AcutalData4.xml");
engine.buildReport(doc, ds);
dataDir = dataDir + "AcutalData_otput4.pdf";
doc.save(dataDir);
But After a certain limit it is throwing IndexOutofBound Exception.
If you still face problem, please share your input document and XML here for testing. We will investigate the issue and provide you more information on this.
Thanks for sharing the document and XML. We have tested the scenario using latest version of Aspose.Words for Java 17.6 and have not found the shared issue. Please use Aspose.Words for Java 17.6. In case you are using Aspose.Words in evaluation mode, we suggest you please request for 30-days temporary license from here: Get temporary license
Please read following article about applying license. Applying a License