Hi Amy,
Thank you for your reply.
the document is W-9 Form which please find enclosed. the following are the code to fill the SSN fields:
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(formFile);
PdfFormWidget formWidget = doc.Form as PdfFormWidget;
for (int i = 0; i < formWidget.FieldsWidget.List.Count; i++)
{
PdfField field = formWidget.FieldsWidget.List[i] as PdfField;
if (field is PdfTextBoxFieldWidget)
{
PdfTextBoxFieldWidget textBoxField = field as PdfTextBoxFieldWidget;
switch (textBoxField.Name)
{
case "topmostSubform[0].Page1[0].SSN[0].f1_11[0]":
if (socialSecurityNumber.Length > 2)
textBoxField.Text =socialSecurityNumber.Substring(0, 3);
break;
case "topmostSubform[0].Page1[0].SSN[0].f1_12[0]":
if (socialSecurityNumber.Length > 5)
textBoxField.Text = socialSecurityNumber.Substring(3, 2);
break;
case "topmostSubform[0].Page1[0].SSN[0].f1_13[0]":
if (socialSecurityNumber.Length >

textBoxField.Text = socialSecurityNumber.Substring(5, 4);
break;
}
}
}
doc.SaveToFile( "-fw9.pdf");
Login to view the files attached to this post.