PdfLoadedXfaTextBoxField Class
Represents the text box field of an existing PDF document`s XFA form.
Inheritance
System.Object
PdfLoadedXfaTextBoxField
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public class PdfLoadedXfaTextBoxField : PdfLoadedXfaStyledField
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//fill the text box
loadedTextBox.Text = "First Name";
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'fill the text box
loadedTextBox.Text = "First Name"
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Properties
CombLength
Gets or sets the comb cells count;
Declaration
public int CombLength { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Get the comb length.
int combLength = loadedTextBox.CombLength;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Get the comb length.
Dim combLength As Integer = loadedTextBox.CombLength
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
MaximumHeight
Gets or sets the maximum height of the text box
Declaration
public float MaximumHeight { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Set maxium height.
loadedTextBox.MaximumHeight = 40;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Set maximum height.
loadedTextBox.MaximumHeight = 40
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
MaximumLength
Gets or sets the maximum char of the text box
Declaration
public int MaximumLength { get; set; }
Property Value
Type |
---|
System.Int32 |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Set the maximum length.
loadedTextBox.MaximumLength = 10;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Set the maximum length.
loadedTextBox.MaximumLength = 10
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
MaximumWidth
Gets or sets the maximum width of the text box
Declaration
public float MaximumWidth { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Set maxium width.
loadedTextBox.MaximumWidth = 200;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Set maximum width.
loadedTextBox.MaximumWidth = 200
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
MinimumHeight
Gets or sets the minimum height of the textbox
Declaration
public float MinimumHeight { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Set minimum height.
loadedTextBox.MinimumHeight = 20;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Set minimum height.
loadedTextBox.MinimumHeight = 20
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
MinimumWidth
Gets or sets the minimum width of the text box
Declaration
public float MinimumWidth { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Set minimum width.
loadedTextBox.MinimumWidth = 100;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Set minimum width.
loadedTextBox.MinimumWidth = 100
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
PasswordCharacter
Gets or sets the password char of the text box field
Declaration
public char PasswordCharacter { get; set; }
Property Value
Type |
---|
System.Char |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Get the password character.
char password = loadedTextBox.PasswordCharacter;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Get the password character.
Dim password As Char = loadedTextBox.PasswordCharacter
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Text
Gets or sets the value of the Text Box
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.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 text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//fill the text box
loadedTextBox.Text = "First Name";
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'fill the text box
loadedTextBox.Text = "First Name"
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Type
Gets or sets the type of the text box
Declaration
public PdfXfaTextBoxType Type { get; set; }
Property Value
Type |
---|
PdfXfaTextBoxType |
Examples
//Load the existing PDF document
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument("input.pdf");
//Load the existing XFA form
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
//Get the loaded text box field.
PdfLoadedXfaTextBoxField loadedTextBox = (loadedForm.Fields["subform1[0]"] as PdfLoadedXfaForm).Fields["text[0]"] as PdfLoadedXfaTextBoxField;
//Get the text box type.
PdfXfaTextBoxType type = loadedTextBox.Type;
//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 text box field.
Dim loadedTextBox As PdfLoadedXfaTextBoxField = TryCast((TryCast(loadedForm.Fields("subform1[0]"), PdfLoadedXfaForm)).Fields("text[0]"), PdfLoadedXfaTextBoxField)
'Get the text box type.
Dim type As PdfXfaTextBoxType = loadedTextBox.Type
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()