Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active October 29, 2020 12:06
Show Gist options
  • Save bjoerntx/0b3c722b95753db1491afd39edd5b79e to your computer and use it in GitHub Desktop.
Save bjoerntx/0b3c722b95753db1491afd39edd5b79e to your computer and use it in GitHub Desktop.
FormField[] acroForms =
TXTextControl.DocumentServer.PDF.Forms.GetAcroFormFields("form.pdf");
foreach (FormField field in acroForms)
{
switch (field)
{
case TXTextControl.DocumentServer.PDF.AcroForms.FormTextField textField:
Console.WriteLine(textField.Value);
break;
case TXTextControl.DocumentServer.PDF.AcroForms.FormCheckBox checkBoxField:
Console.WriteLine(checkBoxField.IsChecked);
break;
case TXTextControl.DocumentServer.PDF.AcroForms.FormComboBox comboBoxField:
foreach(var item in comboBoxField.Options)
Console.WriteLine(item);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment