Mike Marchywka wrote:
>> What do these things return exactly? They seemed to follow
>> x/y position in some documents anyway:
> 
> Sorry, I cut/pasted the wrong text, this is probably the code you meant,
> 
>  public void displayText(String text, Matrix endingTextMatrix){
>         boolean hardReturn = false;
>         if (lastTextLineMatrix != null && lastTextLineMatrix.get(Matrix.I32) 
> != getCurrentTextLineMatrix().get(Matrix.I32)){
>             hardReturn = true;
>         }
>         float currentX = getCurrentTextMatrix().get(Matrix.I31);
>           float sY = getCurrentTextMatrix().get(Matrix.I32);
>         String loc=""+((int)(currentX*100))+" "+((int)(sY*100))+" ";

A String and a position on the page.
Of course, it happens very regularly that words in a PDF are split in 
different strings. In other words that the word "efficinet" is inside 
the PDF as (ef)(ficient) with some extra values between the brackets to 
adapt the kerning so that both 'f' glyphs are closer to each other.
So you also should look at the space between two consecutive Strings to 
find out if they aren't part of the same word.
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to