Thanks for your reply. Right now in the code i'm creating 1 table and adding
headers to it. Also i've put the setHeaderRows = 1 so they will repeat on
each page.
I understood my mistake i should add the table to document 1st then only
i'll be able to get the current pagenumber.
But in my case as it is only a single table, in which i'm adding header rows
then created one more table & put that table in one cell & adding that cell
to main table again.
Once its done adding the main table to document.
If I add that main table as you suggested, the same data is getting added
multiple times, even the headers are getting repeated.
On Wed, Sep 9, 2009 at 6:38 PM, 1T3XT info <[email protected]> wrote:
> 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/
>
------------------------------------------------------------------------------
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/