Hello Paulo,

Thanks for the hint! I had a look at that functinality and checked, if 
ColumnText.go() supports any column-oriented events. In 2.1.7 I did
not see anything.

I do not see, how tagged chunks would help me, as I do not know beforehand 
at what word the end of the column will be reached? The required event is
not content-related but rendering-related.

Or did you mean
- tag all chunks
- build a handler, that is called whenever a chunk is processed
- make that handler remember the latest position
- use that position after go() returns to put the image into the right 
place
?
Still, my chunks hold several words and the words will be hyphenated. So 
that does not sound precise enough.

Also, the book states on page 126, Chp4.6.1 "... this event is not 
triggered immediately after the Chunk object is added to the document..." 
I guess, the sequence of events is not garanteed too.

I see two other options to implement the desired functionality:

- put code into ColumnText.go() to generate an event whenever the column 
if full or the text ends. Then pass the current position in that event 
object
- change ColumnText, so the current position can be obtained with 
getXPos()

Any opinion on those?

Kind regards,
Peter
---------------------------



"Paulo Soares" <psoa...@glintt.com> 
22.04.2010 00:57
Please respond to
Post all your questions about iText here 
<itext-questions@lists.sourceforge.net>


To
"Post all your questions about iText here" 
<itext-questions@lists.sourceforge.net>
cc

Subject
<SPAM> Re: [iText-questions] Where can I get the current horizontal 
positionwithin ColumnText/PDFWriter?






Use a generic tag event.
 
Paulo
----- Original Message ----- 
From: peter.henning...@wcenter.de 
To: itext-questions@lists.sourceforge.net 
Sent: Wednesday, April 21, 2010 12:33 PM
Subject: [iText-questions] Where can I get the current horizontal 
positionwithin ColumnText/PDFWriter?


Hello, 

I have to position an image-icon precisely at the end of a text-column 
(when the ColumnText has more text). The text 
is left-aligned, so the position of the last glyph varies horizontally. 

I get the vertical position with ct.getYLine(). But I have not found a 
similar way to find the horizontal position. The writer 
also seems to have only the vertical position? 

Kind regards,
Peter 
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: 
http://1t3xt.info/tutorials/keywords/
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to