-->

Monday, March 16, 2015

How to create pdf file in windows form c#

How to create pdf file in windows form c#

If you wan to create pdf file in windows form as well as web application , you must to add iTextSharp.dll file as a reference. In iTextSharp , we have a Document class through which we can create a new document. Also provide PdfWriter class, through which we can create a pdf file in a specified path. Now, you can use Paragraph class for creating text. Now, use this code and Generate pdf file:

Document d1 = new Document();
            PdfWriter.GetInstance(d1, new FileStream("E:/t1.pdf", FileMode.Create));
            d1.Open();
            Paragraph p1 = new Paragraph("Hello World");
            d1.Add(p1);
            d1.Close();


Video cover all such things which is i mentioned in above. Also provide the link where you can download the iTextSharp.dll file and where you will put the mentioned code in function.

Read other related articles

Also read other articles

© Copyright 2013 Computer Programming | All Right Reserved