Deepa Thakur wrote:
> Its not possible for me to add the table to the document before the 
> table has any data.

You can add the data in small bits.
For instance: add the table to the document every 20 rows.

> As this table is getting generated at the run time 
> and displayed in pdf doc.

That's not a valid argument.

> want to pick up the page number and put some conditions on it for data 
> placement in that table.

Why don't you understand the elementary logic:

if you create a PdfPTable and keep it in memory,
how on earth can PdfWriter know what data will go
on which page, as long as you keep the PdfPTable
"secret" for the Document and the writer that is
associated with the document.

I am currently reading a book. Can YOU tell me
on which page I am for the moment? Either I'd need
to tell you which book I'm writing and where I am
in the text, or you'd need magic to know what book
I'm reading and what page.

The same goes for your problem: either you add
the PdfPTable to the Document (maybe in small portions),
so that PdfWriter can know on what page you are.
OR you use higher magic.

(That higher magic might be called ColumnText;
read the documentation to find out more about it.)
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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