Thanks, you answered my question.
I looked through the book and the online JavaDoc, and didn't see what
I was looking for, so I started grasping at straws. The information
wasn't easy to find. I have both editions of the book. The only
mention of getLinesWritten() and getYLine() in the new book is as a
single line of code in the examples you mentioned with accompanying
annotation. I think I missed getYLine() because the code sample was
doing something different than I was trying to do.
The JavaDoc entry for getLinesWritten() says
Gets the number of lines written. (useful, but not what I was
looking for).
The JavaDoc entry for getYLine() says
Gets the yLine.
The JavaDoc description of getYLine() doesn't say anything useful.
getLinesWritten() wasn't what I was looking for, but it's good to know
about.
It would help if you would improve the descriptions of getYLine() in
JavaDoc. I can file a doc bug if you would like.
Thanks again for your quick response.
Greg
On Jun 2, 2010, at 11:58 PM, 1T3XT info wrote:
> Greg Holling wrote:
>> Hi all.
>>
>> I'm trying to get the current Y coordinate while I"m inserting text
>> and images into a ColumnText.
>
> Did you read the documentation?
> That is: chapter 3 of the second edition of "iText in Action".
> http://itextpdf.com/book/
>
>> I've tried a bunch of things, none of
>> which seemed to work. Here's a summary:
>>
>> (1) PdfWriter.getVerticalPosition() and
>> PdfWriter.getVerticalPosition(true)
>> both always return the same value: 806.0
>
> That only works if you use the approach described in chapter 2;
> it doesn't work in the totally different approach of chapter 3.
>
>> (2) PdfWriter.setPageEvent()
>
> This isn't what page events is about!
> Please read chapter 5 to understand what page events are for.
>
> ColumnText has methods such as getLinesWritten() (see listing 3.16)
> and getYLine() (see listing 3.18) to find the information that you
> need.
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> iText-questions mailing list
> [email protected]
> 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/
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
iText-questions mailing list
[email protected]
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/