Class PdfLoadedField
Represents base class for loaded fields.
Implements
Inherited Members
Namespace: Syncfusion.Pdf.Parsing
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public abstract class PdfLoadedField : PdfField, IPdfWrapper, INotifyPropertyChanged
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 |
|
Overrides
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
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
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
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
Page
Gets the page of the form field.[Read-Only]
Declaration
public override PdfPageBase Page { get; }
Property Value
Type | Description |
---|---|
PdfPageBase |
Overrides
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
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
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
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
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
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
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)