【发布时间】:2013-10-30 09:49:44
【问题描述】:
我有一些类似的文字
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)
在此表中,我必须显示上面指定的文本。
【问题讨论】:
-
1是什么意思?它是列表中的一个项目吗?到目前为止,您尝试过什么? -
@Alexis,1 只是一个例子。我需要以这种格式显示文本。
标签: itextsharp