The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

PdfFormData.Value Property

Specifies a value to the interactive form field represented by this PdfFormData object.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v19.2.Core.dll

Declaration

public object Value { get; set; }
Public Property Value As Object
public object Value { get; set; }
Public Property Value As Object
public object Value { get; set; }
Public Property Value As Object

Property Value

Type Description
Object

A Object class descendant.

Property Value

Type Description
Object

A Object class descendant.

Property Value

Type Description
Object

A Object class descendant.

Remarks

The value specified for an interactive form field can be a string for text fields, a name of the checked/unchecked appearance for radio buttons and check boxes, an array of strings (for multi select fields) or a PdfFormData object (for the complex fields for which the field name is provided as a key).

Examples

// Load a document with an interactive form.
using (PdfDocumentProcessor documentProcessor = new PdfDocumentProcessor()) {
    documentProcessor.LoadDocument(filePath + fileName + ".pdf");

    // Obtain interactive form data from a document.
    PdfFormData formData = documentProcessor.GetFormData();

    // Specify the value for FirstName and LastName text boxes.
    formData["FirstName"].Value = "Janet";
    formData["LastName"].Value = "Leverling";

    // Specify the value for the Gender radio group.
    formData["Gender"].Value = "Female";

    // Specify the check box checked appearance name.
    formData["Check"].Value = "Yes";

    // Specify values for the Category list box.
    formData["Category"].Value = new string[] { "Entertainment", "Meals", "Morale" };

    // Obtain data from the Address form field and specify values for Address child form fields.
    PdfFormData address = formData["Address"];

    // Specify the value for the Country combo box. 
    address["Country"].Value = "United States";

    // Specify the value for City and Address text boxes. 
    address["City"].Value = "California";
    address["Address"].Value = "20 Maple Avenue";

    // Apply data to the interactive form. 
    documentProcessor.ApplyFormData(formData);

    // Save the modified document.
    documentProcessor.SaveDocument(filePath + fileName + "_new.pdf");

    btnFillFormData.Enabled = false;
    btnLoadFilledPDF.Enabled = true;
}
See Also