Wulf Berschin wrote:
> Well, Acrobat adds a blue frame around the targetted text. Kind of magic 
> for me as PDF newbie, since this bookmark only gives a page and 
> coordinates but not the size of a target.

The size of the target involves plenty of programming;
it's not obvious to do this with iText.

>> Suppose the target is FitH 500, then you could for instance use iText to 
>> add a line and some text at the position y = 500. You need PdfStamper 
>> for this and methods getUnderContent(), lineTo(), moveTo(),...
> 
> So, any chance to find out what object is the target? And to draw a 
> fitting highlighting box around?

There isn't really a target; the coordinates you get are all there is.
What Acrobat probably does, is to select the text that is closest by.
iText can't do that (at least not without some substantial programming;
it's not something that is offered "out of the box"). You'd need to
optimize the parser that is very, very new (and not ready for this kind
of use for the moment).
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to