We are using Aspose PDF Java library 21.3 to get word coordinate in a PDF document.
We first use ParagraphAbsorber to find MarkupParagraph, and from MarkupParagraph to get Point of the polygon to create a Rectangle of this paragraph, and then use TextFragmentAbsorber and TextSearchOptions to search a word in this rectangular area which will return a TextFragmentCollection for matched words in this rectangular area.
But it seems sometimes the TextFragmentCollection returned is empty though the word is present in the rectangular area (paragraph). and I have to drag lower left point and upper right point further to be able to find the word. However, once the word is found, its coordinates seems to be within the rectangular area without the need to be enlarged.
Is this a bug?
The rectangular enlarge also impacts the words that are able to to be found without the need of enlargement. Those words coordinates seems to be moving along with the rectangular size, which does not make sense to me.
Thanks for your help on this matter.