Skip to main content
A newer version of this page is available. .
All docs
V21.1
.NET Framework 4.5.2+

PdfTextFormField.InputType Property

Specifies text form field’s input type.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core

Declaration

public PdfTextFieldInputType InputType { get; set; }

Property Value

Type Description
PdfTextFieldInputType

An enumeration value that indicates the input type.

Remarks

The code sample below retrieves the text 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 text field properties:
      PdfTextFormField addressFormField = (PdfTextFormField)acroForm.GetFormField("Address");
      addressFormField.Multiline = false;
      addressFormField.InputType = PdfTextFieldInputType.PlainText;
  }
See Also