PDF Creation

Gopesh9
Posted by Gopesh9 under C# category on | Points: 40 | Views : 4508
Steps

1. At first download iTextsharp
2. Then add iTextsharp.dll file as reference of your ASP.Net page

Now

You have to use following lines in your aspx page.
using iTextSharp.text;
using iTextSharp.text.pdf;


Now use the following code....

Document firstDocument = new Document(PageSize.A4.Rotate());
PdfWriter.GetInstance(firstDocument, new FileStream("D:\\Gopesh.pdf", FileMode.Create));
firstDocument.Open();
firstDocument.Add(new Paragraph("First Pdf File made by Gopesh using iText"));
firstDocument.Close();

Comments or Responses

Login to post response