If he's using a ColumnText (based on his "2 columns to display the data"
comment), I don't think that'll work.

Hmmm... Ah!

PdfPageEvent.onGenericTag(writer, document, rect, string)

1) add a generic tag to every line of your text (tough if you don't know
where the line breaks will be).
2) register a PdfPageEvent handler that uses onGenericTag to determine
the vertical position. You won't even need getVerticalPosition (and I'm
not sure PdfWriter's position will have been updated at that point),
because onGenericTag is passed a Rectangle.

OR

PdfPageEvent.onParagraph[End](writer, document, float )

Ditto, without the need to tag your lines, but you lose some
"resolution", being alerted at the paragraph level.


In either case, I recommend you extend PdfPageEventHelper, as it stubs
out all the events you're not interested in and only requires you to
override the ones you care about.

--Mark Storer
  Senior Software Engineer
  Cardiff.com
 
#include <disclaimer>
typedef std::disclaimer<Cardiff> Discard;

> -----Original Message-----
> From: Wain, Matthew [mailto:[email protected]]
> Sent: Wednesday, March 17, 2010 5:24 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] How to get Vertical position ???
> 
> float verticalPosition = writer.getVerticalPosition(true);
> 
> 
> Like that.. 'If' that's what your after?
> 
> -----Original Message-----
> From: Neha Yadav [mailto:[email protected]]
> Sent: 17 March 2010 11:47
> To: [email protected]
> Subject: [iText-questions] How to get Vertical position ???
> 
> 
> 
> hello,
>      I have defined 2 columns to display the data. Data is coming from
the
> text file. When I am trying to get the vertical position I get the
> position
> of last line of a page now I want to get the vertical position after
every
> line.
> 
> help me to fix this..
> 
> Thank You!
> 
> 
> 
> 
> --
> View this message in context:
http://old.nabble.com/How-to-get-Vertical-
> position-----tp27930868p27930868.html
> Sent from the iText - General mailing list archive at Nabble.com.
> 
> 
>
------------------------------------------------------------------------
--
> ----
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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
> 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/
> 
> Land Registry's House Price Index is now live. www.landregistry.gov.uk
> 
> If you have received this e-mail and it was not intended for you,
please
> let us know, and then delete it. Please treat our communications in
> confidence, as you would expect us to treat yours. Land Registry
checks
> all mail and attachments for known viruses, however, you are advised
that
> you open any attachments at your own risk.
> 
> 
> 
> The original of this email was scanned for viruses by the Government
> Secure Intranet virus scanning service supplied by Cable&Wireless in
> partnership with MessageLabs. (CCTM Certificate Number 2009/09/0052.)
On
> leaving the GSi this email was certified virus free.
> Communications via the GSi may be automatically logged, monitored
and/or
> recorded for legal purposes.
> 
>
------------------------------------------------------------------------
--
> ----
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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
> 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/
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.733 / Virus Database: 271.1.1/2732 - Release Date:
03/17/10
> 00:33:00

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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
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