Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

How to: Obtain a Checked Appearance Name for a Check Box

This example shows how to get a checked appearance name for the “Female” check box and check the check box with this value.

View Example

using System.Collections.Generic;
using System.Linq;
using DevExpress.Pdf;

static void Main(string[] args)
{
    // Load a document with an interactive form.
    PdfDocumentProcessor processor = new PdfDocumentProcessor();
    processor.LoadDocument("..\\..\\InteractiveForm.pdf");

    PdfDocumentFacade documentFacade = processor.DocumentFacade;
    PdfAcroFormFacade acroForm = documentFacade.AcroForm;

    // Obtain the check box form field:
    PdfCheckBoxFormFieldFacade genderField = acroForm.GetCheckBoxFormField("Female");

    // Specify a checked value for the Female form field:
    genderField.IsChecked = true;

    // Save the modified document.
    processor.SaveDocument("..\\..\\Result.pdf");
}