Creating PDF using .NET itextsharp component VB.NET

To create a PDF file from any .net application is very easy. You just need to use itextsharp component. You can download this component http://itextsharp.sourceforge.net

Just import this component namespace to your application. Here is the sample code.

Dim doc as New Document
PdfWriter.GetInstance(doc,New FileStream(“Sample.pdf”,FileMode.Create))
doc.Open()
doc.Add(New Paragraph(” Add the contects”,FontFactory.GetFont(FontFactory.TIMES ROMAN,22,iTextSharp.text.Font.BOLD)))
doc.close()

Mayur Gondaliya - CTO - CaseTronyx, Inc. Director - ExaSpring Information Services Pvt. Ltd. Web Investor. Software Engineer. Workaholic. Insomniac.

One Comment


  1. Mehmet
    Sep 14, 2010

    Hello,
    When I search sme information about the itextsharp, I see yoru web site. I code a program by vb.net for a company (little company). we want to send the proposal mail to customer about product. I can create a pdf document. but some turkish characters in the pdf document are not shown. if you have any idea about this, please help me. I use vb. net

Leave a Reply