我正在使用下面的代码用文本填充 pdf。可以加一行吗?或横贯pdf的水平线,所以我将文本分成几部分?
Session("PDF") = Session("Hospital") + Environment.NewLine + Session("HospitalAddress") + Environment.NewLine + Session("HospitalCity")
Dim myUniqueFileName = String.Format("{0}.pdf", random)
Dim pdfWrite As PdfWriter = PdfWriter.GetInstance(Doc1, New FileStream(path & myUniqueFileName, FileMode.Create))
Doc1.Open()
Dim test As String
test = Session("PDF")
Dim imagepath As String = Server.MapPath(".") & "/images/Header.png"
Dim image As iTextSharp.text.Image = iTextSharp.text.Image.GetInstance(imagepath)
image.ScalePercent(70.0F)
Doc1.Add(image)
Doc1.Add(New Paragraph(test))
Doc1.Close()