我对图片和iTextSharp的问题在于我想要一个标题,并且在该点下面有文字。
即使添加新段落,我也可以显示图像并包装文本,但不能让它显示在下面。
我假设在aligmnent周围有一些命令,但即使在查看http://www.mikesdotnetting.com/Article/87/iTextSharp-Working-with-images
等教程时,我也很难找到它。'Import Image
Dim vImagePath = "C:\sites\images\" & "Logo.jpg"
Dim jpg As Image = Image.GetInstance(vImagePath)
jpg.ScaleToFit(139.0F, 106.0F)
jpg.Alignment = Image.ALIGN_RIGHT Or Image.TEXTWRAP
jpg.IndentationLeft = 7.0F
jpg.SpacingAfter = 9.0F
jpg.BorderWidthTop = 6.0F
jpg.BorderColorTop = Color.WHITE
document.Add(jpg)
'##Main Document Header
Dim tableHeader As New PdfPTable(1) ' Number in brackets is number of columns
tableHeader.DefaultCell.Border = Rectangle.NO_BORDER
Dim phFirst As Phrase = New Phrase("Title", HeaderFont)
tableHeader.AddCell(phFirst)
document.Add(tableHeader)