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));
            Paragraph p1 = new Paragraph("Hello World");

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.


Popular posts from this blog

difference between structure and union in C Language

Difference between Linear search and Binary Search in c language

Difference between static and dynamic websites