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 32 33 34 35 36 37 38 39 40 41 42 43 44
|
Dim tableau As PdfPTable
Dim i as integer
Dim j as integer
tableau = New PdfPTable(11)
tableau.SpacingBefore = 20
cellule.Colspan = 11
tableau.AddCell(New Phrase("test1", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test2", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test3", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test4", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test5", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test6", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test7", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test8", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test9", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test10", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
tableau.AddCell(New Phrase("test11", FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.BOLD)))
i = 0
While i < malistview.Items.Count
j = 0
cellule.Colspan = 11
While j < malistview.Items(i).SubItems.Count()
tableau.AddCell(New Phrase(malistview.Items(i).SubItems(j).Text, FontFactory.GetFont("Arial", 6, iTextSharp.text.Font.NORMAL)))
j = j + 1
End While
i = i + 1
End While
tableau.TotalWidth = 770
tableau.LockedWidth = True
cellule.HorizontalAlignment = 1
Doc.Add(tableau) |
Partager