Table of Contents

Class PdfLoadedXfaCheckBoxField

Namespace
Syncfusion.Pdf.Xfa
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded XFA check box field.

public class PdfLoadedXfaCheckBoxField : PdfLoadedXfaStyledField
Inheritance
PdfLoadedXfaCheckBoxField
Inherited Members

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded check box field.
PdfLoadedXfaCheckBoxField loadedCheckBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["checkBox[0]"] as PdfLoadedXfaCheckBoxField;
//Check the check box          
loadedCheckBox.IsChecked = true;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded check box field.
Dim loadedCheckBox As PdfLoadedXfaCheckBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("checkBox[0]"), PdfLoadedXfaCheckBoxField)
'Check the check box          
loadedCheckBox.IsChecked = True
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

Constructors

PdfLoadedXfaCheckBoxField()

public PdfLoadedXfaCheckBoxField()

Properties

CheckBoxAppearance

Gets or sets the appearance of the check box

public PdfXfaCheckBoxAppearance CheckBoxAppearance { get; set; }

Property Value

PdfXfaCheckBoxAppearance

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded check box field.
PdfLoadedXfaCheckBoxField loadedCheckBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["checkBox[0]"] as PdfLoadedXfaCheckBoxField;
//Check the check box          
loadedCheckBox.IsChecked = true;
//Get the check box appearance.
PdfXfaCheckBoxAppearance appearance = loadedCheckBox.CheckBoxAppearance;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded check box field.
Dim loadedCheckBox As PdfLoadedXfaCheckBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("checkBox[0]"), PdfLoadedXfaCheckBoxField)
'Check the check box          
loadedCheckBox.IsChecked = True
'Get the check box appearance.
Dim appearance As PdfXfaCheckBoxAppearance = loadedCheckBox.CheckBoxAppearance
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

CheckBoxSize

Gets or sets the size of the check box

public float CheckBoxSize { get; set; }

Property Value

float

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded check box field.
PdfLoadedXfaCheckBoxField loadedCheckBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["checkBox[0]"] as PdfLoadedXfaCheckBoxField;
//Check the check box          
loadedCheckBox.IsChecked = true;
//Get the checkbox size.
float checkBoxSize = loadedCheckBox.CheckBoxSize;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded check box field.
Dim loadedCheckBox As PdfLoadedXfaCheckBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("checkBox[0]"), PdfLoadedXfaCheckBoxField)
'Check the check box          
loadedCheckBox.IsChecked = True
'Get the checkbox size.
Dim checkBoxSize As Single = loadedCheckBox.CheckBoxSize
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

CheckedStyle

Gets or sets the checked styles of the check box

public PdfXfaCheckedStyle CheckedStyle { get; set; }

Property Value

PdfXfaCheckedStyle

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded check box field.
PdfLoadedXfaCheckBoxField loadedCheckBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["checkBox[0]"] as PdfLoadedXfaCheckBoxField;
//Check the check box          
loadedCheckBox.IsChecked = true;
//Get the checked style.
PdfXfaCheckedStyle style = loadedCheckBox.CheckedStyle;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded check box field.
Dim loadedCheckBox As PdfLoadedXfaCheckBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("checkBox[0]"), PdfLoadedXfaCheckBoxField)
'Check the check box          
loadedCheckBox.IsChecked = True
'Get the checked style.
Dim style As PdfXfaCheckedStyle = loadedCheckBox.CheckedStyle
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

IsChecked

Gets or sets a value indicating whether this is checked or not

public bool IsChecked { get; set; }

Property Value

bool

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded check box field.
PdfLoadedXfaCheckBoxField loadedCheckBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["checkBox[0]"] as PdfLoadedXfaCheckBoxField;
//Check the check box          
loadedCheckBox.IsChecked = true;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded check box field.
Dim loadedCheckBox As PdfLoadedXfaCheckBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("checkBox[0]"), PdfLoadedXfaCheckBoxField)
'Check the check box          
loadedCheckBox.IsChecked = True
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()