Oh, thank you.It's very kind of you to show me the source code. Thanks.
Though for now I don't quite understand your code.
Thing is, I can get the position of the text. It's page no, X coordinate,
Y coordinate, height, width, line no, start character index, end character
index, etc. But how can I access the text which is confined in this area?
The thing I want to do is to add action to it, be it goto a web page, or a
remote pdf, or a local destination. Your code is obviously extracted from a
program so it misses the context, so I don't quite understand. For example,
what is the Matrix class stands for? In itext, I don't see any class with
that name. And lastTextLineMatrix, what is it? Would you be so kind to tell
me a bit more? I'm very grateful.



>>
>> 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))+" ";
>
>
>
>> [ this is my code but the context makes clear my quesiton- the
>> values from PdfLiteral.getXXX() are what exactly ]
>>
>> public void dig(PdfLiteral d, PrintStream os)
>> {oute(os,"lit: "+d.getPosition()+" "+d.getPosLength()+" 
>> "+d.toString()); }
>>
>> The reader needs to render the text so it needs to determine position 
>> etc.
>> If the text exists as text in the source document you should be able
>> to manipulate it ( with your own reflow algorithm...)
>>
>>
>>>
>>> So the initial answer still stands: it's not possible in general.
>>> --
>>> 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
>>
>> _________________________________________________________________
>> Quick access to your favorite MSN content and Windows Live with Internet 
>> Explorer 8.
>> http://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A
>> ------------------------------------------------------------------------------
>> 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
>
> _________________________________________________________________
> Rediscover HotmailĀ®: Get quick friend updates right in your inbox.
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates1_042009
> ------------------------------------------------------------------------------
> 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
> 

------------------------------------------------------------------------------
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