Table of Contents

Class PdfLoadedXfaNumericField

Namespace
Syncfusion.Pdf.Xfa
Assembly
Syncfusion.Pdf.Portable.dll

Represents the loaded numeric field of the XFA form.

public class PdfLoadedXfaNumericField : PdfLoadedXfaStyledField
Inheritance
PdfLoadedXfaNumericField
Inherited Members

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded numeric field.
PdfLoadedXfaNumericField loadedNumericField = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["numericField[0]"] as PdfLoadedXfaNumericField;
//fill the numeric field
loadedNumericField.NumericValue = 945322;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded numeric field.
Dim loadedNumericField As PdfLoadedXfaNumericField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("numericField[0]"), PdfLoadedXfaNumericField)
'fill the numeric field
loadedNumericField.NumericValue = 945322
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

Constructors

PdfLoadedXfaNumericField()

public PdfLoadedXfaNumericField()

Properties

CombLenght

Gets or sets the comb cells

public int CombLenght { get; set; }

Property Value

int

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded numeric field.
PdfLoadedXfaNumericField loadedNumericField = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["numericField[0]"] as PdfLoadedXfaNumericField;
//fill the numeric field
loadedNumericField.NumericValue = 945322;
//Set the comb length.
loadedNumericField.CombLenght = 6;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded numeric field.
Dim loadedNumericField As PdfLoadedXfaNumericField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("numericField[0]"), PdfLoadedXfaNumericField)
'fill the numeric field
loadedNumericField.NumericValue = 945322
'Set the comb length.
loadedNumericField.CombLenght = 6
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

FieldType

Get the numeric field type

public PdfXfaNumericType FieldType { get; }

Property Value

PdfXfaNumericType

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded numeric field.
PdfLoadedXfaNumericField loadedNumericField = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["numericField[0]"] as PdfLoadedXfaNumericField;
//Get the numeric field type.
PdfXfaNumericType type = loadedNumericField.FieldType;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded numeric field.
Dim loadedNumericField As PdfLoadedXfaNumericField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("numericField[0]"), PdfLoadedXfaNumericField)
'Get the numeric field type.
Dim type As PdfXfaNumericType = loadedNumericField.FieldType
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

NumericValue

Gets or sets the Value of the numeric Field

public double NumericValue { get; set; }

Property Value

double

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded numeric field.
PdfLoadedXfaNumericField loadedNumericField = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["numericField[0]"] as PdfLoadedXfaNumericField;
//fill the numeric field
loadedNumericField.NumericValue = 945322;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded numeric field.
Dim loadedNumericField As PdfLoadedXfaNumericField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("numericField[0]"), PdfLoadedXfaNumericField)
'fill the numeric field
loadedNumericField.NumericValue = 945322
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()

PatternString

Get the pattern string

public string PatternString { get; }

Property Value

string

Examples

//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded numeric field.
PdfLoadedXfaNumericField loadedNumericField = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["numericField[0]"] as PdfLoadedXfaNumericField;
//Get the pattern string.
string pattern = loadedNumericField.PatternString;
//Save the document
loadedDocument.Save("output.pdf");
//Close the document
loadedDocument.Close();
'Load the existing PDF document
Dim loadedDocument As New PdfLoadedXfaDocument("input.pdf")
'Load the existing XFA form
Dim loadedForm As PdfLoadedXfaForm = loadedDocument.XfaForm
'Get the loaded numeric field.
Dim loadedNumericField As PdfLoadedXfaNumericField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("numericField[0]"), PdfLoadedXfaNumericField)
'Get the pattern string.
Dim pattern As String = loadedNumericField.PatternString
'Save the document 
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()