如何设置pdfptable的字体?
最佳答案
创建词组时,必须在每个单元格中设置字体:
Dim yourFont As BaseFont = BaseFont.CreateFont( _
Current.Server.MapPath("~/fonts/somefont.TTF"), _
BaseFont.WINANSI, BaseFont.EMBEDDED)
Dim mainFont As New Font(yourFont, SOME_FONT_SIZE, Font.NORMAL)
Dim cell As New PdfPCell(New Phrase("some text", mainFont))
yourTable.Add(cell)