views:

207

answers:

1

how do i use pdfptable as a real table (A x B) instead of just (A x A)

declaring it this way gives me just one row:

Dim datatable As PdfPTable = New PdfPTable(4)

how can i declare it so that it has multiple rows and multiple columns?

+1  A: 

You already are declaring it with multiple columns. The rows are automatic. With your current setup, you're declaring a table with four columns. Now what you need to do is add cells. They will add across until they hit your column count and then they will start a new row.

So:

Dim table As New PdfPTable(4)
For i As Integer = 0 To 12
    Dim cell As New PdfPCell("cell " & i)
    table.Add(cell)
Next

Should yield a 3x4 table.

Jason
jason thanks so much man may i contact u directly with more questions
I__
keep asking them here and i'll answer them so others can benefit too
Jason
thanks so much sounds great, is it possible that to have your email so that i email u links to my questions?
I__
http://stackoverflow.com/questions/1374556/itextsharp-creating-more-than-1-pdfptable
I__