Re: PDFTextPositions

2014-04-02 Thread Sireesha Chilakamarri
Thank you Alin. Appreciate your response. I f you can help with a sample code - if you are free sometime, maybe I get a better idea of your explanation. Sireesha On Wed, Apr 2, 2014 at 4:31 PM, Alin Mazilu wrote: > Not that I know of. PDFBox provides mostly low level access to the PDF > form

Re: PDFTextPositions

2014-04-02 Thread Alin Mazilu
Not that I know of. PDFBox provides mostly low level access to the PDF format. The only relatively easy way to do it would be keep the TextPosition objects and also grab the text output of the PDFTextStripper. Then you can search the output (a String) for the position of the word you are looking fo

Re: PDFTextPositions

2014-04-02 Thread Sireesha Chilakamarri
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/20

Re: PDFTextPositions

2014-04-02 Thread Alin Mazilu
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

PDFTextPositions

2014-04-02 Thread Sireesha Chilakamarri
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, Sire