We have stumbled across an issue that we cannot currently overcome. We have attempted to troubleshoot the problem using the information already held on the forums to no prevail. Our line of business involves the printing of a varying amount of letter templates stored in a .dot format. When processing these documents via C# (populating fields and other information) then printing or saving; there seems to be a form of misalignment between the different elements of the document.
The headers seem to be pushed up and the footer is missing entirely. The body text of the documents also appears to be raised from its original position. Printing using Microsoft Word (2003 and 2010) is fine.
Things that have been tried to be configured:
- Paper Size/Height/Width - alters the page alignment but not how it is expected.
- Altering the page size to a different size (to A5 and Custom) just as an investigation, yet it still cut off the top of the document in the same way the preferred A4/Letter options did.
- Altering Margins, this does not cater for all nodes (images, paragraphs etc.) and moves only some of them and therefore is unreliable.
- Looping through each node to apply individual settings - bit of a hack but is inconsistent with many templates.
- Tried using the extension of the word files as a '.doc' and '.docx'. Tried saving the '.dot.’ file as a '.docx' first then using that as the template.
We have struggled to find a solution for this issue and was wondering whether you had any further information or knowledge regarding this problem. We have attached a sample document template that is causing the printing problem through aspose.words.