We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Determining Page Number Position of a given Paragraph, Table, or Image in Word Document using C# Java

I have the same question about determining the page number of a given Paragraph, Table, or Image. The link you referred to is not valid.


Please check:

For example, you can meet this requirement by using the following code;

Document doc = new Document("E:\\Temp\\in.docx");

Paragraph targetPara = doc.FirstSection.Body.FirstParagraph;
Shape targetShape = (Shape)doc.FirstSection.Body.GetChildNodes(NodeType.Shape, true)[0];

LayoutCollector collector = new LayoutCollector(doc);


Hope, this helps.

This worked out great thanks.