Xamarin.iOS

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class PdfLoadedField - Xamarin.iOS API Reference | Syncfusion

    Show / Hide Table of Contents

    Class PdfLoadedField

    Represents base class for loaded fields.

    Inheritance
    System.Object
    PdfField
    PdfLoadedField
    PdfLoadedStyledField
    Inherited Members
    PdfField.DefineDefaultAppearance()
    PdfField.Initialize()
    PdfField.Flatten
    PdfField.DisableAutoFormat
    PdfField.PdfTag
    PdfField.TabIndex
    PdfField.Layer
    Namespace: Syncfusion.Pdf.Parsing
    Assembly: Syncfusion.Pdf.Portable.dll
    Syntax
    public abstract class PdfLoadedField : PdfField, IPdfWrapper
    Examples
    //Create a new document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form fields
    foreach (PdfLoadedField field in doc.Form.Fields)
    {
      // Flatten the form
      field.Flatten = true;
    }
    doc.Save("Form.pdf");
    doc.Close(true);
     'Create a new document
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form fields
    For Each field As PdfLoadedField In doc.Form.Fields
      ' Flatten the form
    field.Flatten = True
    Next field
    doc.Save("Form.pdf")
    doc.Close(True)

    Fields

    ObjectID

    Form field identifier

    Declaration
    public int ObjectID
    Field Value
    Type Description
    System.Int32

    Properties

    Export

    Gets or sets a value indicating whether this PdfLoadedField is export.

    Declaration
    public override bool Export { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if export; otherwise, false.

    Overrides
    PdfField.Export
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    field.Export = true;
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    field.Export = True
    doc.Save("Form.pdf")
    doc.Close(True)

    Form

    Gets the form of the PdfLoadedField.[Read-Only]

    Declaration
    public PdfForm Form { get; }
    Property Value
    Type Description
    PdfForm
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    PdfForm form = field.Form;
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    Dim form As PdfForm = field.Form
    doc.Save("Form.pdf")
    doc.Close(True)

    MappingName

    Gets or sets the mapping name to be used when exporting interactive form field data from the document.

    Declaration
    public override string MappingName { get; set; }
    Property Value
    Type Description
    System.String

    A string value specifying the mapping name of the field.

    Overrides
    PdfField.MappingName
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    // Sets the Mapping name as 'FirstField'
    field.MappingName = "FirstField";            
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    ' Sets the Mapping name as 'FirstField'
    field.MappingName = "FirstField"
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedField
    PdfLoadedDocument

    Name

    Gets the name of the field.[Read-Only]

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    System.String

    A string value specifying the name of the field.

    Overrides
    PdfField.Name
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    // Read the field name
    String fieldName = field.Name;            
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    ' Read the field name
    Dim fieldName As String = field.Name
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedField
    PdfLoadedDocument

    Page

    Gets the page of the form field.[Read-Only]

    Declaration
    public override PdfPageBase Page { get; }
    Property Value
    Type Description
    PdfPageBase
    Overrides
    PdfField.Page
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    PdfPageBase page = field.Page;  
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    Dim page As PdfPageBase = field.Page
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedField
    PdfPageBase

    ReadOnly

    Gets or sets a value indicating whether [read-only].

    Declaration
    public override bool ReadOnly { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the field is read-only, false otherwise. Default is false.

    Overrides
    PdfField.ReadOnly
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    // Set the form field as read only
    field.ReadOnly = true;
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    ' Set the form field as read only
    field.ReadOnly = True
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedDocument
    PdfLoadedField

    Required

    Gets or sets a value indicating whether this PdfLoadedField is required.

    Declaration
    public override bool Required { get; set; }
    Property Value
    Type Description
    System.Boolean

    True if the field is required, false otherwise. Default is false.

    Overrides
    PdfField.Required
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    field.Required = true;
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    field.Required = True
    doc.Save("Form.pdf")
    doc.Close(True)

    ToolTip

    Gets or sets the tool tip of the form field.

    Declaration
    public override string ToolTip { get; set; }
    Property Value
    Type Description
    System.String
    Overrides
    PdfField.ToolTip
    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    // Sets the tooltip of the field
    field.ToolTip = "FirstField";       
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    ' Sets the tooltip of the field
    field.ToolTip = "FirstField"
    doc.Save("Form.pdf")
    doc.Close(True)
    See Also
    PdfLoadedField
    PdfLoadedDocument

    Methods

    SetName(String)

    Sets the name of the field.

    Declaration
    public void SetName(string name)
    Parameters
    Type Name Description
    System.String name

    New name of the field.

    Examples
    //Load an existing document.
    PdfLoadedDocument doc = new PdfLoadedDocument("SourceForm.pdf");
    //load the form field
    PdfLoadedField field = doc.Form.Fields[0] as PdfLoadedField;
    // Sets new name of the first field
    field.SetName("fieldFirstName");
    doc.Save("Form.pdf");
    doc.Close(true);
    'Load an existing document.
    Dim doc As PdfLoadedDocument = New PdfLoadedDocument("SourceForm.pdf")
    'load the form field
    Dim field As PdfLoadedField = TryCast(doc.Form.Fields(0), PdfLoadedField)
    ' Sets new name of the first field
    field.SetName("fieldFirstName")
    doc.Save("Form.pdf")
    doc.Close(True)

    See Also

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