background of the issue: I may get different kind of templates which contains controls(Text Box, check box) some times in a paper/word document.pdf document templates.
Now i have to assign values in that provided templates, and have to save it as pdf document.
So i found some thing useful for templating called Openoffice,from there i am able to add controls and able to save as pdf template document.
Now for that template need to assign values, for that found one dll called iTextSharp.
based on the samples while i am trying to add , the count of the fields in the pdf template is showing as 0. could any body help me out to assign the values for the PDF template? Below is the code i am using for this case.
private void ListFieldNames()
{
string pdfTemplate = @"D:\17.pdf";
loadPDF(pdfTemplate);
// title the form
//this.Text += " - " + pdfTemplate;
// create a new PDF reader based on the PDF template document
PdfReader pdfReader = new PdfReader(pdfTemplate);
// create and populate a string builder with each of the
// field names available in the subject PDF
StringBuilder sb = new StringBuilder();
foreach (DictionaryEntry de in pdfReader.AcroFields.Fields)
{
sb.Append(de.Key.ToString() + Environment.NewLine);
}
// Write the string builder's content to the form's textbox
// userName.Text = sb.ToString();
}