With the following code and attachment,i found that the pageindex of 3 pictures are all 1.
i think the pageinde of 3 pictures should be 1,2,3.
test.docx is copied from other document.I tried to make a document like it wiht MS word, and the pageindex is all right like i think.
why all the pageindx of 3 pictures in test.docx are 1?
image.png (75.1 KB)
test.docx (1.3 MB)
public static void GetPageIndex()
{
Aspose.Words.License license = new Aspose.Words.License();
//MemoryStream stream = new MemoryStream(File.ReadAllBytes(@"C:\Users\gdli\Desktop\Aspose.Total.NET.lic"));
license.SetLicense(LicenseStream1);
Document doc = new Document(@"C:\Users\gdli\Desktop\test.docx");
LayoutCollector collector = new LayoutCollector(doc);
NodeCollection nodes = doc.GetChildNodes(NodeType.Any, true);
foreach (Node para in nodes)
{
Console.WriteLine($"type:{para.NodeType}");
Console.WriteLine($"page index :{collector.GetStartPageIndex(para)}");
Console.WriteLine($"GetNumPagesSpanned:{collector.GetNumPagesSpanned(para)}");
Console.WriteLine($"text:{para.GetText()}");
}
}