I ran into a problem when use document.PageCount property to get document pages is inconsistent with the page count of the microsoft word.
The follow is my code:
var doc =new Document(@“c:\Paper.docx”);
doc.PageCount; //return 89, consistent with the word page count.
doc.PageCount; //return 91, inconsistent with the word page count ,the word page count still 89
For some reason, i must invoke the doc.UpdateTableLayout() method.
so, for this inconsistency, any suggestions for us or some background to avoid the situation.