how to identify on which page my paragraph is there…if first paragraph has 1 and half page of content and if i merge second paragraph then i will get second paragapth in mid of the page …in tht case how to idenfigy my second paragraph is on which page ?
Thanks for your request. There is no direct method to get number of page where paragraph is located. However, you can try using code like the following to achieve this:
Document doc= new Document(@“c:\temp\in.docx”);
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a PAGE field and update it.
Field page = builder.InsertField(“PAGE”);
int pageNumber = int.Parse(page.Result);
// Remove PAGE field.
I hope, this will help.