2009-12-16 1 views
1

내가이 pdftable에 글꼴을 변경하려고 VB.NET하고 난 자바에서이 힌트를 가지고 있지만 vb.net에 넣어 도움이 필요itextsharp는 : 자바는

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
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

는 헬 베티 카는 말한다 system.drawing.font의 구성원이 아닙니다. –

+2

VB.NET에서 'Imports iTextSharp.text'를 사용하면 Visual Studio에서 System.Drawing.Font 또는 iTextSharp.text를 원하기 때문에 혼동을 일으킬 수 있습니다. 세례반. 원하는 Font 객체를 완전히 한정하면이 문제를 해결할 수 있습니다. – Stewbob

+0

대단히 감사합니다. –