Hi Allin, I am able to run the PrintTextLocations example. This gives me the locations details for every characters.
Is there a easier way to get coordinates for a Word as a whole, instead of all its characters? To Search for Text, I used a method prescribed in http://www.programming-free.com/2012/11/simple-word-search-in-pdf-files-using.html. Is there a easier way to Search for Text as well? Are there no direct APIs? Thank you, Sireesha On Wed, Apr 2, 2014 at 3:55 PM, Alin Mazilu <[email protected]> wrote: > You have to extend the PDFTextStripper class and override the > processTextPosition(...) method. From there the logic depends on you. You > can also override the writePage() method to grab the charactersByArticle > Vector and then you would look for your words in there by iterating over > it. Basically in both cases you will grab all TextPosition objects and > figure out your position and height/width form there. > > ~Alin > > > On Wed, Apr 2, 2014 at 6:32 PM, Sireesha Chilakamarri < > [email protected]> wrote: > > > Hi, > > > > I would like to Search and Obtain Text Position (X/Y/Width/height) for > the > > searched Text. > > > > Suppose text "Hello_World" appears at different location and on different > > pages on the PDF document, I would like to see its X/Y/Width/Height for > > every occurence. > > > > How do I achieve this? > > > > Thank you, > > Sireesha > > >
