Class PdfLoadedStateField
Represents the base class for loaded state field.
Inheritance
System.Object
PdfLoadedStateField
Implements
System.ComponentModel.INotifyPropertyChanged
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Parsing
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public abstract class PdfLoadedStateField : PdfLoadedStyledField, IPdfWrapper, INotifyPropertyChanged
Examples
//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Read the 'Gender' radio button field
PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
// Flatten the radio button field
radiobuttonField.Flatten = true;
doc.Save("LoadedForm.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Read the 'Gender' radio button field
Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
' Flatten the radio button field
radiobuttonField.Flatten = True
doc.Save("LoadedForm.pdf")
doc.Close(True)
Properties
Items
Gets the items collection.[Read-Only]
Declaration
public PdfLoadedStateItemCollection Items { get; }
Property Value
Type | Description |
---|---|
PdfLoadedStateItemCollection |
Examples
//Load an existing document
PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
// Getting the 'Gender' radio button field
PdfLoadedRadioButtonListField radiobuttonField = doc.Form.Fields["Gender"] as PdfLoadedRadioButtonListField;
// Radio button field collection
PdfLoadedRadioButtonItemCollection radiobuttonFieldCollection = radiobuttonField.Items;
// Radio button field item
PdfLoadedRadioButtonItem radiobuttonItem = radiobuttonFieldCollection[0];
// Set the first item as selected item
radiobuttonItem.Selected = true;
doc.Save("Form.pdf");
doc.Close(true);
'Load an existing document
Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
' Getting the 'Gender' radio button field
Dim radiobuttonField As PdfLoadedRadioButtonListField = TryCast(doc.Form.Fields("Gender"), PdfLoadedRadioButtonListField)
' Radio button field collection
Dim radiobuttonFieldCollection As PdfLoadedRadioButtonItemCollection = radiobuttonField.Items
' Radio button field item
Dim radiobuttonItem As PdfLoadedRadioButtonItem = radiobuttonFieldCollection(0)
' Set the first item as selected item
radiobuttonItem.Selected = True
doc.Save("Form.pdf")
doc.Close(True)
See Also
Methods
Remove(PdfLoadedStateItem)
Declaration
public void Remove(PdfLoadedStateItem item)
Parameters
Type | Name | Description |
---|---|---|
PdfLoadedStateItem | item |
RemoveAt(Int32)
Declaration
public void RemoveAt(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index |
SetCheckedStatus(Boolean)
Sets checked status of the field.
Declaration
protected void SetCheckedStatus(bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | value | Checked status. |
Implements
System.ComponentModel.INotifyPropertyChanged