Wow, funny this comes up. Actually this is something I'm trying really
hard to implement at the moment ;-)

2009/6/25 Roman Klinger <[email protected]>:
> Internally, it is representing the needed information (the Java Class is
> existing). It prints text fragments. The printed objects are TextPositions
> which have the represented text and the position on the page as attribues.

This is exactly the way I went as well - see my project's code at [1].
The problem is to combine the text fragments in the right way (and sum
up related positions) to find the strings you want to hightlight.
I think my code might be a good point to get started. It's working for
a lot of cases: Of course, there are lots where it doesn't highlight
anything or highlights too much. Maybe someone would be interested to
make some comments?

HTH!

[1] 
http://code.google.com/p/javasolutions/source/browse/trunk/PdfLibrary/src/maw/pdflib/gui/preview/CustomPage.java
(FYI: it's a "home" project, programming is just a hobby for me..)

Reply via email to