PdfTextFormField.InputType Property
In This Article
Specifies text form field’s input type.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.2.Core.dll
NuGet Package: DevExpress.Pdf.Core
#Declaration
public PdfTextFieldInputType InputType { get; set; }
#Property Value
Type | Description |
---|---|
Pdf |
An enumeration value that indicates the input type. |
Available values:
Name | Description |
---|---|
Plain |
The field value is a plain text string. |
Rich |
The field value is a rich text string. |
Password | The field value is a password. |
File |
The field value is a path to a file. |
Comb | The field is divided into equally spaced positions or combs. The Pdf |
#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