Skip to main content
.NET Framework 4.5.2+

PdfAcroFormVisualField.ReadOnly Property

Gets or sets whether the interactive form field allows editing.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v22.2.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