Enum PdfXfaCheckedStyle
Represents the XFA checkBox style
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum PdfXfaCheckedStyle
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Create a form.
PdfXfaForm xfaForm = new PdfXfaForm(PdfXfaFlowDirection.Vertical, 595);
//Set margin of the form.
xfaForm.Margins.All = 10;
//Create new XFA check box field.
PdfXfaCheckBoxField field = new PdfXfaCheckBoxField("check1", new SizeF(100, 30));
//Set caption.
field.Caption.Text = "CheckBox";
//Set checkbox appearance.
field.CheckBoxAppearance = PdfXfaCheckBoxAppearance.Square;
//Set the check box size.
field.CheckBoxSize = 10;
//Set the checked style.
field.CheckedStyle = PdfXfaCheckedStyle.Cross;
//Set the check box checked state.
field.IsChecked = true;
//Add the field to form.
xfaForm.Fields.Add(field);
document.XfaForm = xfaForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//Close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Create a form.
Dim xfaForm As New PdfXfaForm(PdfXfaFlowDirection.Vertical, 595)
'Set margin of the form.
xfaForm.Margins.All = 10
'Create new XFA check box field.
Dim field As New PdfXfaCheckBoxField("check1", New SizeF(100, 30))
'Set caption.
field.Caption.Text = "CheckBox"
'Set checkbox appearance.
field.CheckBoxAppearance = PdfXfaCheckBoxAppearance.Square
'Set the check box size.
field.CheckBoxSize = 10
'Set the checked style.
field.CheckedStyle = PdfXfaCheckedStyle.Cross
'Set the check box checked state.
field.IsChecked = True
'Add the field to form.
xfaForm.Fields.Add(field)
document.XfaForm = xfaForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
Fields
Name | Description |
---|---|
Check | A check mark is used for the checked state. |
Circle | A circle is used for the checked state. |
Cross | A cross is used for the checked state. |
Default | default checked state. |
Diamond | A diamond symbol is used for the checked state. |
Square | A square is used for the checked state. |
Star | A star is used for the checked state. |