Hi,

I need some help am creating a dinamic table that grows to much and when its
to big  my pdf is not growing with it.

What am trying to say is that it gets cut and theres no second page can some
help me with this i dont know why am not getting the second page or the
information 

the code:
Dim oTable2 As New PdfPTable(4)
Dim widths2 As Integer() = {18.0F, 30.0F, 30.0F, 30.0F}
oTable2.SetWidths(widths2)
Dim oCell2 As PdfPCell
With oTable2
oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
"Niveles de Acceso", _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
oCell2.HorizontalAlignment = Element.ALIGN_RIGHT
.AddCell(oCell2)
Dim dtDepart As DataTable = ds.Tables(1)
Dim strGrupo As String = ""
Dim cantCeldas As Integer = 0
Dim numeroTablas As Integer = 0
If Not dtDepart Is Nothing And dtDepart.Rows.Count > 0 Then

oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
"Empresa", _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
"Departamento", _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
"Sub Departamento", _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
For Each row As DataRow In dtDepart.Rows
'cantCeldas = cantCeldas + 1
'numeroTablas = numeroTablas + 1
'If cantCeldas > 30 Then
' oDoc.NewPage()
' cantCeldas = 0
'Else


oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
" ", _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
'oCell.Border = 0
oCell2.BorderWidthTop = 1.0F
oCell2.BorderColorTop = BaseColor.WHITE
oCell2.BorderColorRight = BaseColor.BLACK
oCell2.BorderColorBottom = BaseColor.WHITE
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
oCell2 = New PdfPCell( _
New iTextSharp.text.Paragraph( _
row("NOM_EMPRESA"), _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
'oCell.Border = 0
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)

oCell2 = New PdfPCell( _
New iTextSharp.text.Paragraph( _
row("DES_DEPART"), _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
'oCell.Border = 0
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)

oCell2 = New PdfPCell( _
New iTextSharp.text.Paragraph( _
row("DES_SUB"), _
FontFactory.GetFont("Arial", 8, iTextSharp.text.Font.NORMAL)))
'oCell.Border = 0
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
''End If
Next
'Me.tdEmpresas.InnerHtml += "
"
End If




'
'Dim oImg As MsdnMag.DynamicImage
'oImg = New MsdnMag.DynamicImage
'oImg.Image = i
'tdBarcode.Controls.Add(oImg)
''
'/// tabla anidada
oCell2 = New PdfPCell( _
New iTextSharp.text.Phrase( _
"Autorizo a esta persona a la informacion como asi tambien a retirar las
cajas que le corresponden, deacuerdo a su nivel de acceso.", _
FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.NORMAL)))
oCell2.Colspan = 4
oCell2.HorizontalAlignment = Element.ALIGN_LEFT
.AddCell(oCell2)
End With
oTable2.TotalWidth = oDoc.PageSize.Width - 90
oTable2.SplitLate = 0
oTable2.SplitRows = 1
'oTable.WriteSelectedRows(0, -1, 10, oDoc.PageSize.Height - 36, cb)
'oTable2.WriteSelectedRows(0, -1, 50, 565, cb)
Dim altura2 As Integer = oTable2.CalculateHeights()
Dim altura As Integer = oTable.CalculateHeights
Dim alturaTotal As Integer = altura + altura2
oTable2.WriteSelectedRows(0, -1, 50, oDoc.PageSize.Height - altura - 142,
pdfw.DirectContent)

please help me 









--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Table-is-being-cut-and-not-show-de-information-tp4657972.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
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

Reply via email to