How to get the paragraph information of the doc document, and the position of this paragraph in the pdf after the doc is converted to pdf

The paragraph information that can be obtained in the Word document, when the document is converted to PDF, can the same paragraph position information be obtained in the PDF (the page number where the paragraph is located, the coordinates of each word of the paragraph)

@yjsdfsdf As you may know, MS Word documents are flow documents and do not contain any information about document layout. The consumer applications, like MS Word or Open Office builds document layout on the fly. Aspose.Words uses it’s own layout engine to build document layout to render the document to PDF or any other fixed page formats and for printing. Also, Aspose.Words provides LayoutCollector and LayoutEnumerator classes, that allows to get layout information from the document.
Your requirements can be achieved using LayoutCollector and LayoutEnumerator classes. It is required to wrap each paragraph in your document into a bookmark and then determine rectangle of bookmark start and bookmark end using LayoutCollector and LayoutEnumerator . Union of these rectangles will give you bounding box of the paragraph calculated by Aspose.Words layout engine. For example see the following code:

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

// Wrap paragraphs into bookmarks to be able to calculate bounds of paragraphs.
Iterable<Paragraph> paragraphs = doc.getChildNodes(NodeType.PARAGRAPH, true);
ArrayList<String> paraBookmakrs = new ArrayList<String>();
int i = 0;
for (Paragraph p : paragraphs)
{
    // LayoutCollector and LayoutEnumerator does not work with nodes in header/footer
    if (p.getAncestor(NodeType.HEADER_FOOTER) != null)
        continue;

    String bkName = "tmp_bookmark_" + i;
    paraBookmakrs.add(bkName);
    i++;
    p.prependChild(new BookmarkStart(doc, bkName));
    p.appendChild(new BookmarkEnd(doc, bkName));
}

// Create LayoutCollector and LayoutEnumerator.
LayoutCollector collector = new LayoutCollector(doc);
LayoutEnumerator enumerator = new LayoutEnumerator(doc);

// Calculate bounding box of the first and the last lines of the paragraphs.
for (String tmpBkName : paraBookmakrs)
{
    Bookmark bk = doc.getRange().getBookmarks().get(tmpBkName);

    // Move enumerator to the start of the bookmark.
    enumerator.setCurrent(collector.getEntity(bk.getBookmarkStart()));
    // Move enumerator to the line where the bookmark is located.
    while (enumerator.getType() != LayoutEntityType.LINE)
        enumerator.moveParent();

    // Print bounding box of the first line of the paragraph.
    Rectangle2D rect = enumerator.getRectangle();
    System.out.println("X=" + rect.getX() + "; Y=" + rect.getY() + "; Width=" + rect.getWidth() + "; Height=" + rect.getHeight());

    // Do the same for the bookmark end.
    enumerator.setCurrent(collector.getEntity(bk.getBookmarkEnd()));
    while (enumerator.getType() != LayoutEntityType.LINE)
        enumerator.moveParent();

    rect = enumerator.getRectangle();
    System.out.println("X=" + rect.getX() + "; Y=" + rect.getY() + "; Width=" + rect.getWidth() + "; Height=" + rect.getHeight());

    System.out.println("===============================");
    // If you need to calculate bounding box of the whole paragraph,
    // you can calculate it as union of the start and end lines
    // if the paragraph is located on the same page and the same txt column.
    // Otherwise it will be required to add additional logic to calculate bounding box
    // of paragraphs' lines located on different pages or text columns
}

Regarding PDF document, it is better to ask in Aspose.PDF forum. My colleagues from Aspose.PDF team will help you shortly.