我有一些文字
1 a
b
c
d
使用 iTextSharp 我如何显示这个(在单独的行中,一个接一个)?
我的代码:
Dim pdftableSLD As PdfPTable = New PdfPTable(3)
pdftableSLD.DefaultCell.Padding = 3
pdftableSLD.WidthPercentage = 96
pdftableSLD.DefaultCell.BorderWidth = 1
pdftableSLD.DefaultCell.HorizontalAlignment = Element.ALIGN_LEFT
pdftableSLD.DefaultCell.VerticalAlignment = Element.ALIGN_MIDDLE
pdftableSLD.DefaultCell.FixedHeight = 40.0F
pdftableSLD.HorizontalAlignment = 1
Dim widthsSLD As Single() = {0.5F, 1.25F, 2.5F}
pdftableSLD.SetWidths(widthsSLD)
Dim stuName As PdfPCell = New PdfPCell(FormatPhrase(""))
stuName.Colspan = 4
stuName.Border = Rectangle.BOTTOM_BORDER
stuName.NoWrap = True
stuName.HorizontalAlignment = Element.ALIGN_CENTER
pdftableMain.AddCell(stuName)
在此表中,我必须显示上面指定的文本。