I have found a few cases when page number of paragraph is provided incorrectly by Aspose.Word. I am using version 22.4 of java Aspose.Word.
To get the page number, I am using the following code:
LayoutCollector layoutCollector = new LayoutCollector(asposeDocument); int startPageIndex = layoutCollector.getStartPageIndex(asposeParagraph); int endPageIndex = layoutCollector.getEndPageIndex(asposeParagraph);
In case 1: exp1.zip (42.1 KB)
Paragraph “Figure Captions” (page 8, line number 240)
It returns startPageIndex=7.
Incae 2: exp2.zip (72.2 KB)
Paragraphs on page 47:
Table 1 (line number: 1016)
The active ingredients used in cosmetic formulations (line number 1018)
and all paragraphs in the two first rows have startPageIndex=46 and endPageIndex=46. Bu all these paragraphs are located on page 47.
Could you take a look? Maybe I use incorrect way to identify page number for paragraphs?
Thank you in advance,