To Fill a PDF form you need Adobe Acrobat Professional Version in your Machine.
using iTextSharp; using iTextSharp.text; using iTextSharp.text.pdf; using iTextSharp.text.xml; PdfReader Reader = new PdfReader(new RandomAccessFileOrArray (Server.MapPath(" + filename + ")), null); newFile = Server.MapPath("~/NEW " + filename + "");//To fill the PDF in a separate location with separate file which will be readonly (for end user) Stamper = new PdfStamper(Reader, new FileStream(newFile,FileMode.Create)); AcroFields Fields = Stamper.AcroFields; Fetch the data from DB to be filled and store it in a data table if (dtStudentInfo.Rows.Count > 0) { Fields.SetField("txtName", "" + dtStudentInfo.Rows[0]["NAME "].ToString() + ""); } // make resultant PDF read-only for end-user Stamper.FormFlattening = true; Stamper.FreeTextFlattening = true; Stamper.Close();//If forget to close() PdfStamper, you end up with a corrupted file! Response.ContentType = "application/pdf"; fileList.Add(newFile); string Path = newFile; System.IO.FileInfo pdfFile = new FileInfo(Path); if (pdfFile.Exists) { Response.Clear(); Response.WriteFile(pdfFile.FullName); }