Hi
There appears to be a problem with page counting when there are tables invovled. I’m not entirely sure if its the tables that causes the problem, but I haven’t been able to replicate it without them.
I’ve attached a document that has 6 pages when opened in Word. However, when loading the document and checking the page count, I get 5.
var doc = new Document("TestDocumentWithTables.docx", new LoadOptions()
{
LoadFormat = LoadFormat.Docx
});
var docPageCount = doc.PageCount; // =5
This also become apparent when I render the pages as images (using RenderToSize). All the nodes are visible, but the pages breaks appear in the wrong place and data overlaps the footer in some cases.
When I save the document back as another Word doc, however, it appears fine again. But saving as another format such as PDF (see attached also) or an image format, the problem becomes apparent again.
Anything I’m doing wrong? Or is there a known bug perhaps?