Tableau itextsharp different taille cellule entete .
Bonjours voila j'ai coder mon tableau en itextsharp . il et récupérer d'un datagridview .
Mais voila lorsque le tableau apparaît sur mon pdf ls 3 cellule de l’entête son de taille égale . et je voudrais pouvoir leur assigner une taille par moi même .
voici mon code
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| pdfTable.DefaultCell.BackgroundColor = BaseColor.WHITE
pdfTable.DefaultCell.Padding = 5
pdfTable.WidthPercentage = 100
pdfTable.HorizontalAlignment = Element.ALIGN_LEFT
pdfTable.DefaultCell.BorderWidth = 0
''Adding Header row
For Each column As DataGridViewColumn In FormDEVIS.DgDevis.Columns
Dim cell As New PdfPCell(New Phrase(column.HeaderText))
cell.BackgroundColor = New BaseColor(240, 240, 240)
cell.HorizontalAlignment = 1
pdfTable.AddCell(cell)
Next
''Adding DataRow
For Each row As DataGridViewRow In FormDEVIS.DgDevis.Rows
For Each cell As DataGridViewCell In row.Cells
If cell.Value = vbNullString Then
Else
pdfTable.AddCell(cell.Value.ToString())
End If
Next
Next |