Skip to main content
.NET Framework 4.5.2+

PdfButtonFormField Class

A button field (a push button, radio group, check box) on a PDF interactive form that the user can manipulate with the mouse.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v22.1.Core.dll

Declaration

public class PdfButtonFormField :
    PdfInteractiveFormField

Remarks

The code sample below retrieves the button form field by name and changes its properties:

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())
{
    pdfDocumentProcessor.LoadDocument("FormDemo.pdf");
    ChangeFormFields(pdfDocumentProcessor);
    pdfDocumentProcessor.SaveDocument("FormDemo.pdf");
    Process.Start(new ProcessStartInfo("FormDemo.pdf")
       { UseShellExecute = true });
}


  private static void ChangeFormFields(PdfDocumentProcessor pdfDocumentProcessor)
  {
      PdfInteractiveForm acroForm = pdfDocumentProcessor.Document.AcroForm;

      //Change radio group field properties:
      PdfButtonFormField genderFormField = (PdfButtonFormField)acroForm.GetFormField("Gender");
      genderFormField.ToggleToOff = true;
  }

The following code snippets (auto-collected from DevExpress Examples) contain references to the PdfButtonFormField class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

Inheritance

Object
DevExpress.Pdf.Native.PdfDocumentItem
DevExpress.Pdf.Native.PdfObject
PdfInteractiveFormField
PdfButtonFormField
See Also