Here is an example application.
It takes two input files, Letter.doc and Table.doc, from the InputDocuments folder, and writes out four files to OutputDocuments. I’ve included the output that I get in the MyOutput folder.
Table.doc was originally written out by Aspose, Letter.doc was just output by Word after loading the template. In our application, we would populate the merge field before writing the final document to .doc and .tiff.
In the output, the multi-page Table.tif demonstrates the table layout problem I’m having, and Table-UpdateTableLayout.tif demonstrates the table layout being fixed using your suggestion to call UpdateTableLayout. It isn’t perfect, too many columns, not enough spacing, but that is more the fault of our template than anything to do with Aspose
So, fixing the layout of that table is great. Unfortunately, Letter.tif demonstrates the problem I have with some other templates when I call UpdateTableLayout. Letter.tif is fine, but if you compare to Letter-UpdateTableLayout.tif, you’ll see that the logo in the top right gets cut off. It looks like that cell has been resized to fit the text, ignoring the image size.
So, where I am at the moment, is that I’m using a hack to decide whether to call UpdateTableLayout or not. However, it isn’t a good hack, since the templates are end-user configurable, so it would be perfectly possible for a user to set up a template with a header like Letter.doc, but a table like Table.doc, so I’m looking for a solution which works in both cases.
Thanks for looking into this.