OK,
now I have a little bit more time (allthough you should turn to the mailing list for faster replies). I see you haven't posted the question to the mailinglist yet, so I forward it.

Bibin wrote:

But the real problem with this application is that it will have to generate reports having multilevel headings.Something like this..

First thing I notice are the gaps between the inner table and outer cell.
You should set the padding of the outer cell to 0.
Then there is the problem of the column widths.
Why not use the same PdfPTable for header and data?

<>
1. The above table was created using PdfPTable, as it doesnt support rowspan, we have decided to use nested tables for each inner heading level.. in the above figure we have used 3 nested tables for Sterilization,VAS and IUD. the problem we found was the border of inner tables, eventhough we have selectively removed the borders of innertable as it was statically coded, can u suggest a better approach for that.

Does setting the padding of the outer cell to 0 solve this problem?

<>2. the table header and table data are two tables and are glued together. the problem is the difference in number of columns for header and data . In the above one the header is having 5 columns and data is having 12 columns. The actual number of data columns is determined by what we call as parameters, ie the leaf cells of header. How could I accurately align the data columns with the leaf cells of header.For the above table what we have done is.. table.getAbsoluteWidths() for each inner table and pass the float array thus obtained from different inner tables to the constructor of data table. since it was a tedious process, even if it was statically coded. But the result was As you can see there is some difference in the column width for data and heading leaf cells. Whats the reason. can you suggest a method such that I can have the width of data columns same as those of heading leaf cells, which I could use effectively in my application for dynamic generation.

OK, now I understand why you can't have the header in the same table as the data. There must be a solution, but I don't see one rightnow (and I don't have a lot of time
for the moment)

3. Can I get the column text from a cell?

So you create a PdfPCell and you want to have access to the inner ColumnText object.
Why? (Maybe if we know why, it's possible to give a better solution.)

<>4. can I implement the header for this application using ordinary Table

As you need special stuff with rowspan, this would be an option you should consider. Do the Tables span a lot of pages? If they fit on one page, Table will certainly do.
br,
Bruno


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to