有沒有辦法將字體分配給添加到ITextsharp中表格單元格的列表。我相信它一定是直截了當的,但我錯過了它。ITextSharp,將字體分配給List中的單元格?
Dim tblSignature As New PdfPTable(1)
tblSignature.WidthPercentage = 90.0F
Dim _baseFont As BaseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.NOT_EMBEDDED)
Dim _bFont As New Font(_baseFont, 4, Font.ITALIC, Color.RED)
Dim cell As New PdfPCell(New Phrase(TheItem.Value, _bFont))
TheParagraph.Font = _bFont
Dim list As New List(list.UNORDERED, 25.0F)
list.SetListSymbol("[ ]")
If ListItems.Count > 0 Then
For Each ListItem In .ListItems
//I have tried adding as chunk/phrase and applying font but no joy
//Item not added to cell
//list.Add(New Chunk(ListItem, _bFont))
list.Add(ListItem)
Next
list.IndentationLeft = 5.0F
cell.AddElement(list)
End If
cell.Colspan = 6
cell.HorizontalAlignment = 0
cell.PaddingBottom = 5.0F
cell.PaddingLeft = 5.0F
cell.PaddingRight = 5.0F
'' add to doc
tblSignature.AddCell(cell)
TheParagraph.Add(tblSignature)
有誰知道我該如何改變這個,以便列表/單元格具有我在頂部設置的特定字體。
乾杯
血腥地獄,我直接應用一個字符串到列表而不是使用ListItem,非常感謝 – Israfel 2010-08-03 08:17:52