Adam,
I"m not able to upgrade (to 11.2.0 or 11.3.0) at the moment, but will likely early next week. I’ll test out the new Aspose.Words and let you know what I get.
I have noticed however that we are getting inconsistent results with the API (Aspose.Word.dll 10.6.0) on the attached document. Using the code below your API is showing only 3 sections (the foreach loop) in the word doc, but your document explorer application shows 8 sections. This is the first time I’ve noticed this. I dont know if its related to the Word Doc or not.
public static string[,] GetAllHeaderInfo(Document doc)
{
Dictionary<Section, int> sectionStartPageList = GetPageStartOfSections(doc);
CopyLinkedHeadersFooters(doc, sectionStartPageList);
string previousHeaderInfo = "";
string currentHeaderInfo = "";
string emptyHeaderInfo = "";
int startingPageNumberOfThisSection = 1;
int numberOfPagesInThisSection = 1;
int sectionCounter = 1; //debugging only
var watermarkList = InitializeWatermarkList(doc);
foreach (Section currentSection in doc.Sections)
{
numberOfPagesInThisSection = GetNumberOfPagesInSection(currentSection, sectionStartPageList);
startingPageNumberOfThisSection = sectionStartPageList[currentSection];
currentHeaderInfo = GetHeaderInfo(currentSection);
int stringCompareValue = String.Compare(currentHeaderInfo, emptyHeaderInfo);
if (stringCompareValue == 0)
currentHeaderInfo = previousHeaderInfo;
watermarkList = PopulateWatermarkList(currentHeaderInfo, watermarkList, startingPageNumberOfThisSection, numberOfPagesInThisSection);
previousHeaderInfo = currentHeaderInfo;
sectionCounter++; //debug only
}
string[] headerInfoArray = new string[2];
return watermarkList;
}