Skip to main content

PdfAcroFormVisualField.ReadOnly Property

Gets or sets whether the interactive form field allows edit operations.

Namespace: DevExpress.Pdf

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

NuGet Package: DevExpress.Pdf.Core


public bool ReadOnly { get; set; }

Property Value

Type Description

true, if end-users cannot modify the form field’s value; otherwise, false.


The code sample below creates a locked text box field:

using (PdfDocumentProcessor pdfDocumentProcessor = new PdfDocumentProcessor())

    // Create a text box field:
    PdfAcroFormTextBoxField textBox =
          new PdfAcroFormTextBoxField("text box", 1, new PdfRectangle(230, 690, 280, 710));

    // Specify text box text and appearance:
    textBox.Text = "Text Box";
    textBox.Appearance.BackgroundColor = new PdfRGBColor(0.8, 0.5, 0.3);
    textBox.Appearance.FontSize = 12;

    // Lock the field:
    textBox.ReadOnly = true;

See Also