I am using Aspose Words 15.7, Visual Studio 2013, and .NET 4.5. I am using Words to generate both MS Word documents and convert the same documents to PDF.
It is when I attempt to save as PDF, that this problem occurs.
The scenario is quite complicated, so I have attached some code, rather than attempt to post a lot of sample code inline. Note that the attached code uses several functions (not included) as a shorthand for loading the Aspose licence, generate a file name, and open the document once it has been created.
The generated documents contain header/footer information that involves inserting a table into the header or footer to allow for alignment of the text (particularly on pages where the header consists of some left-aligned and some right-aligned text).
The problem is, whenever I set up the table in the header or footer, all tables generated subsequently have their cell widths set to 100% of the client width of the page, ignoring the width explicitly set for that cell. This occurs even if the tables in question are in another Section.
I can get around this problem, to a certain extent, by generating the entire document without headers or footers, and then going back and generating the headers and footers at the end of the process. This is not ideal, though, for obvious reasons.
There is a secondary problem too. The width of tables in the header or footer is always 100% of the client width of the page, even when I explicitly set the width to something else.
NOTE: This only happens when I attempt to save the document as PDF. The save as docx version works just fine.