Skip to main content
All docs
V25.1
  • PdfTextFormField.Multiline Property

    Gets or sets whether the text field can contain multiple lines of text.

    Namespace: DevExpress.Pdf

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

    NuGet Package: DevExpress.Pdf.Core

    Declaration

    public bool Multiline { get; set; }

    Property Value

    Type Description
    Boolean

    true if the text box field can contain multiple lines of text; otherwise, false.

    Remarks

    This property has no effect if the text field type is Comb.

    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