Geeks With Blogs
Deeksha Sharma
 Open a new console application 

Go to:- visual studio 2010-> tools-> Library Package Manager-> Package Manager Console
type the command->
Install-Package iTextSharp

now start, write program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using iTextSharp;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.IO;

namespace PDFFormGenerator
{
    class Program
    {
        static void Main(string[] args)
        {
            Document doc = new Document(iTextSharp.text.PageSize.LETTER, 10, 10, 42, 35);
            PdfWriter wri = PdfWriter.GetInstance(doc, new FileStream(@"E:\test.pdf", FileMode.Create));
            doc.Open();
            Paragraph paragraph = new Paragraph("My first Pdf in life");
            doc.Add(paragraph);
            doc.Close();
        }
    }
}

 
Posted on Thursday, July 17, 2014 5:14 AM | Back to top


Comments on this post: How to generate Pdf file using ItextSharp in c#

# re: How to generate Pdf file using ItextSharp in c#
Requesting Gravatar...
ZetPDF.com is the best PDF library in the market. I have tried many of others and they either aren't as simple or simply don't have the features like ZetPDF.com
Left by Ronald Kaplan on Apr 20, 2018 9:03 AM

Your comment:
 (will show your gravatar)


Copyright © Deeksha Sharma | Powered by: GeeksWithBlogs.net