PdfTextFormField.InputType Property
Specifies text form field’s input type.
Namespace: DevExpress.Pdf
Assembly: DevExpress.Pdf.v24.1.Core.dll
NuGet Package: DevExpress.Pdf.Core
Declaration
Property Value
Type | Description |
---|---|
PdfTextFieldInputType | An enumeration value that indicates the input type. |
Available values:
Name | Description |
---|---|
PlainText | The field value is a plain text string. |
RichText | The field value is a rich text string. |
Password | The field value is a password. |
FileSelect | The field value is a path to a file. |
Comb | The field is divided into equally spaced positions or combs. The PdfTextFormField.MaxLen or PdfTextFormFieldFacade.MaxLength property defines the number of available characters. |
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