menu

Document Processing

PdfLoadedStateField Class - C# PDF Library API Reference | Syncfusion

    Show / Hide Table of Contents

    PdfLoadedStateField Class

    Represents the base class for loaded state field.

    Inheritance
    System.Object
    PdfField
    PdfLoadedField
    PdfLoadedStyledField
    PdfLoadedStateField
    PdfLoadedCheckBoxField
    PdfLoadedRadioButtonListField
    Implements
    System.ComponentModel.INotifyPropertyChanged
    Inherited Members
    PdfField.DisableAutoFormat
    PdfField.Flatten
    PdfField.GetValue(String)
    PdfField.Initialize()
    PdfField.Layer
    PdfField.PdfTag
    PdfField.PropertyChanged
    PdfField.SetValue(String, String)
    PdfField.TabIndex
    PdfLoadedField.Export
    PdfLoadedField.Form
    PdfLoadedField.MappingName
    PdfLoadedField.Name
    PdfLoadedField.ObjectID
    PdfLoadedField.Page
    PdfLoadedField.ReadOnly
    PdfLoadedField.Required
    PdfLoadedField.SetName(String)
    PdfLoadedField.ToolTip
    PdfLoadedStyledField.BorderColor
    PdfLoadedStyledField.BorderStyle
    PdfLoadedStyledField.BorderWidth
    PdfLoadedStyledField.Bounds
    PdfLoadedStyledField.DefaultIndex
    PdfLoadedStyledField.DefineDefaultAppearance()
    PdfLoadedStyledField.Font
    PdfLoadedStyledField.GetGraphicsProperties(PdfLoadedStyledField.GraphicsProperties, PdfLoadedFieldItem)
    PdfLoadedStyledField.GotFocus
    PdfLoadedStyledField.Location
    PdfLoadedStyledField.LostFocus
    PdfLoadedStyledField.MouseDown
    PdfLoadedStyledField.MouseEnter
    PdfLoadedStyledField.MouseLeave
    PdfLoadedStyledField.MouseUp
    PdfLoadedStyledField.RotationAngle
    PdfLoadedStyledField.Size
    PdfLoadedStyledField.StyleToString(PdfCheckBoxStyle)
    PdfLoadedStyledField.Visibility
    PdfLoadedStyledField.Visible
    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
    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
    PdfLoadedStateItemCollection

    Methods

    Remove(PdfLoadedStateItem)

    Remove the particular PdfLoadedStateItem from PdfLoadedStateField.

    Declaration
    public void Remove(PdfLoadedStateItem item)
    Parameters
    Type Name Description
    PdfLoadedStateItem item
    Examples
     //Load an existing document
     PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");        
     //Get the loaded form.
      PdfLoadedForm loadedForm = loadedDocument.Form;
     //Get the stateField
     PdfLoadedStateField stateField = loadedForm.Fields[0] as PdfLoadedStateField;
     //Get the stateField Item
     PdfLoadedStateItem stateFieldItem = stateField.Items[0] as PdfLoadedStateItem;
    //Remove the stateField item
     loadedField.Remove(stateFieldItem);
    //Save the modified document.
     loadedDocument.Save("form.pdf");
    //Close the document
    loadedDocument.Close(true);

    RemoveAt(Int32)

    Remove the PdfLoadedStateField item at the specified index.

    Declaration
    public void RemoveAt(int index)
    Parameters
    Type Name Description
    System.Int32 index
    Examples
     //Load an existing document
     PdfLoadedDocument loadedDocument = new PdfLoadedDocument("input.pdf");        
     //Get the loaded form.
      PdfLoadedForm loadedForm = loadedDocument.Form;
     //Get the stateField 
     PdfLoadedStateField stateField = loadedForm.Fields[0] as PdfLoadedStateField;       
    //Remove the stateField item
     stateField.RemoveAt(0);
    //Save the modified document.
     loadedDocument.Save("form.pdf");
    //Close the document
    loadedDocument.Close(true);

    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

    See Also

    PdfLoadedStyledField
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved