Hi,

I am using ITextSharp dll in my ASP.Net application to generate formatted
pdf file. But i am getting problem in the code.
1) While adding cell in the to the table contains the nested table.
2) While inserting table in the cell having *colspan 19 *the table not
Expanding into 19 colspan width. its nesting in single column.

Its very urgent for me please any one can help me. Even the sample i
downloaded from the *Sourceforge.Net* tutorial also not working i am getting
exception in nested table tutorials.

The code i have written is as follows.

Regards,
Laxmikanth.O


Table tblMain = new Table(40,26);

tblMain.Border = Rectangle.NO_BORDER;

tblMain.WidthPercentage = 100;

Cell cellFirst = new Cell();

cellFirst.Rowspan = 40;

Image imgSide = Image.GetInstance(new Uri(
@"C:\Kappa_RelatedDocument\iTextSharpTutorial\iTextSharpTutorial\bonImg\sideTekstKappa.gif"
));

cellFirst.Add(imgSide);

tblMain.AddCell(cellFirst);

cellFirst = new Cell(new Phrase(new Chunk("Datum: 30-06-2005",

FontFactory.GetFont(FontFactory.HELVETICA, 10, iTextSharp.text.Font
.BOLD))));

cellFirst.Colspan = 19;

cellFirst.Rowspan = 2;

tblMain.AddCell(cellFirst,new System.Drawing.Point(0,1));

//Cell for the Gap Between the 2nd and 3rd columns

cellFirst = new Cell("G");

cellFirst.Rowspan = 40;

tblMain.AddCell(cellFirst, new System.Drawing.Point(0, 20));

//2 nd column

cellFirst = new Cell();

cellFirst.Colspan = 19;

cellFirst.Rowspan = 5;

cellFirst.Width = 100;

Table tblAfhaaladres = new Table(19,5);

tblAfhaaladres.Border = Rectangle.NO_BORDER;

tblAfhaaladres.AutoFillEmptyCells = true;

tblAfhaaladres.WidthPercentage = 100;

Cell cellAfhaaladres = new Cell("A1");

cellAfhaaladres.Width = 19;

tblAfhaaladres.AddCell(cellAfhaaladres, new System.Drawing.Point(0, 0));

string strVal = cellAfhaaladres.GetWidthAsString();

cellAfhaaladres = new Cell("A2");

cellAfhaaladres.Colspan = 19;

tblAfhaaladres.AddCell(cellAfhaaladres, new System.Drawing.Point(1, 0));

cellAfhaaladres = new Cell("A3");

cellAfhaaladres.Colspan = 19;

tblAfhaaladres.AddCell(cellAfhaaladres, new System.Drawing.Point(2, 0));

cellAfhaaladres = new Cell("A4");

cellAfhaaladres.Colspan = 19;

tblAfhaaladres.AddCell(cellAfhaaladres, new System.Drawing.Point(3, 0));

cellAfhaaladres = new Cell("A5");

cellAfhaaladres.Colspan = 19;

tblAfhaaladres.AddCell(cellAfhaaladres, new System.Drawing.Point(4, 0));

cellFirst.Add(tblAfhaaladres);

*tblMain.InsertTable(tblAfhaaladres, **new System.Drawing.Point**(2, 1));*

//*tblMain.AddCell(cellFirst, new System.Drawing.Point(2, 1));*
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to