2009-12-16 48 views

回答

2
Imports iTextSharp.text 
Imports iTextSharp.text.pdf 

Module Module1 

    Sub Main() 

     Dim table As New PdfPTable(3) 
     table.AddCell("Cell 1") 
     Dim f As New Font(Font.HELVETICA, 8.0F, Font.NORMAL, Color.YELLOW) 
     Dim ph As New Phrase("Cell 2", f) 
     Dim cell As New PdfPCell(ph) 

    End Sub 

End Module 
+0

它說HELVETICA不是system.drawing.font的成員 – 2009-12-16 20:13:39

+2

在VB.NET中,當使用'Imports iTextSharp.text'時,您可能會發生衝突,因爲Visual Studio對您是想要System.Drawing.Font還是iTextSharp.text感到困惑。字體。完全限定你想要的Font對象可以解決這個問題。 – Stewbob 2009-12-16 20:19:25

+0

非常感謝你,你超級 – 2009-12-16 20:30:13