views:

146

answers:

1

i am trying to change the font on a pdftable and i have this hint in java but need some help to put it into vb.net

 PdfPTable table = new PdfPTable(3);
    table.AddCell("Cell 1");
    PdfPCell cell = new PdfPCell(new Phrase("Cell 2", new Font(Font.HELVETICA, 8f, Font.NORMAL, Color.YELLOW)));
+2  A: 
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
Doc Brown
it says HELVETICA is not a member of system.drawing.font
I__
In VB.NET, when 'Imports iTextSharp.text' is used, you can get a conflict because Visual Studio is confused about whether you want System.Drawing.Font or iTextSharp.text.Font. Fully qualifying which Font object you want can resolve this.
Stewbob
thank you very much you are super
I__