Hey,
I noticed issue when Page Break is added after if statement.
You can find samples of files in attachment.PageBreakIssue.zip (17.3 KB)
var documentPath = @"D:\MyRepos\PageBreakIssue\files\error.dot";
var document = new Document(documentPath);
var layout = new LayoutCollector(document);
foreach (var node in document.GetChildNodes(NodeType.Paragraph, true))
{
Console.Write(layout.GetStartPageIndex(node));
}
Thanks,
Mateusz