Hi there... its great that you, guys, make this Library.
So about the Bug and Maybe its a Feature. I guess, i can be easily
corrected. Well, I tried to make a Nested Table. For this, I using
DefaultCell to to save the Layout, how the Cell should looks like. If I
tried to Add A Cell through Nested.AddCell(new PdfPCell(...)), the
default Layout got lost. All Values was setted back to Zero or Null. So
I've tried to find out what was wrong.
Usually AddCell("Content") use DefaultCell."Content", but
AddCell(iTextSharp.text.pdf.PdfPCell) dont use the DefaultCell as
Container. Its creating new Cell while Runtime from the PdfPCell class.
I guess, DefaultCell do not Support a Container Cell itself, so it
cannot be used like DefaultCell.Cell = item; //(as PdfPCell)
Is it a Feature or kinda "BUG"?
Code
public void AddCell(PdfPCell cell) {
rowCompleted = false;
PdfPCell ncell = new PdfPCell(cell);
int colspan = ncell.Colspan;
colspan = Math.Max(colspan, 1);
colspan = Math.Min(colspan, currentRow.Length - currentRowIdx);
ncell.Colspan = colspan;
....
/**
* Adds a nested table.
* @param table the table to be added to the cell
*/
public void AddCell(PdfPTable table) {
defaultCell.Table = table;
AddCell(defaultCell);
defaultCell.Table = null;
}
if its a bug... it can be corrected really easy. Just extract the
DefaultCell values and put this to ncell in the code above!
Thanks
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php