I have a requirement where I have to replace a text with another text using aspose pdf for java.
I have two grids containing some data on different pages. Each grid has some columns.
The search text remains the same but the substituted value changes based on the position of the column.
Please have a look at the attached pdf. I have highlighted what is the requirement on the various pages (at the bottom).
As an update, I have already tried the regular approaches that are there where we iterate over a textfragmentcollection - over the youtube aspose tutorial video.
but, is there something that is there that will help me know that it is part of a column so that I can exploit it to set the replace accordingly.
like apart from getting .getTextFragment().getPosition() and trying to find x,y co-ordinates and interating over the y part to understand which column header it is - whether "Max Inventory Cost" or "Max inventory sale" (from pdf document attached) - is there any other easy to iterate over and find out the particular fragment and replace it.
NOTE: the source file from where its generated has no way to distinguish the columns (apart from the headers) - no difference in color,size,formatting. the only way to know is if that is 999999.