I am new to ASPOSE and I am trying to dynamically create/amend documents. The documents will be created from templates and will be amended by a batch file, so there will be no user interaction. Because of this, sections will not be used (we have over 250 templates and section info would have to be stored for each detailing section number and it’s content).
The batch file will retrieve the templates and will update form object placeholders with data. The name and type of placeholder will be passed to the batch file depending on the requirement.
My problem is this:
At the end of the document I add data in the form of a table. I have successfully created the table using the “startTable”, “InsertCell” methods (as the documentation details for table creation). However, now I am trying to format the cells without success. The documentation details to format tables by creating a table from a section and adding formatting this way:
Table table = new Table(sec1); table.setDefaultCellBorder(new BorderInfo(BorderSide.All, 0.1F));
Because the document will not have sections I cannot create the table from any section on the document. Is there any way I can apply formatting when either creating the table (using startTable()) or when inserting the cell (InsertCell()).
I have tried using CellFormat but cannot get this to work (and I am not sure I am using this correctly).
Any help would be greatly appreciated.