Class PdfLoadedXfaStyledField
Represents the abstract class of the loaded XFA form fields styled parameters.
Inheritance
System.Object
PdfLoadedXfaStyledField
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public abstract class PdfLoadedXfaStyledField : PdfLoadedXfaField
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()
Constructors
PdfLoadedXfaStyledField()
Declaration
protected PdfLoadedXfaStyledField()
Properties
Border
Gets or set the border
Declaration
public PdfXfaBorder Border { get; set; }
Property Value
Type | Description |
---|---|
PdfXfaBorder |
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 border color.
loadedTextBox.Border.Color = Color.Red;
//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 border color.
loadedTextBox.Border.Color = Color.Red
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Caption
Gets or sets the caption
Declaration
public PdfXfaCaption Caption { get; set; }
Property Value
Type | Description |
---|---|
PdfXfaCaption |
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 caption text.
string text = loadedTextBox.Caption.Text;
//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 caption text.
Dim text As string = loadedTextBox.Caption.Text
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Font
Gets or sets the Font
Declaration
public PdfFont Font { set; }
Property Value
Type | Description |
---|---|
PdfFont |
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 font.
loadedTextBox.Font = new PdfStandardFont(PdfFontFamily.Helvetica, 12);
//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 font.
loadedTextBox.Font = New PdfStandardFont(PdfFontFamily.Helvetica, 12)
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
ForeColor
Gets or set the fore color.
Declaration
public PdfColor ForeColor { get; set; }
Property Value
Type | Description |
---|---|
PdfColor |
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 fore color of the field
PdfColor foreColor = loadedTextBox.ForeColor;
//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 fore color of the field.
Dim foreColor As PdfColor = loadedTextBox.ForeColor
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Height
Gets or sets the height
Declaration
public float Height { get; set; }
Property Value
Type | Description |
---|---|
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;
//Get the height of the field.
float height = loadedTextBox.Height;
//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 height of the field.
Dim height As Single = loadedTextBox.Height
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
HorizontalAlignment
Gets or sets the horizontal alignment of the field
Declaration
public PdfXfaHorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
PdfXfaHorizontalAlignment |
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 horizontal alignment of the field.
loadedTextBox.HorizontalAlignment = PdfXfaHorizontalAlignment.Center;
//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 horizontal alignment of the field.
loadedTextBox.HorizontalAlignment = PdfXfaHorizontalAlignment.Center
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Location
Gets or sets the location
Declaration
public PointF Location { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.PointF |
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 location of the field.
PointF location = loadedTextBox.Location;
//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 location of the field.
Dim location As PointF = loadedTextBox.Location
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
ReadOnly
Gets or sets the field is readonly
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 read only.
loadedTextBox.ReadOnly = true;
//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 read only.
loadedTextBox.ReadOnly = True
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
ToolTip
Gets or sets tool tip
Declaration
public string ToolTip { get; set; }
Property Value
Type | Description |
---|---|
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;
//Set tool tip.
loadedTextBox.ToolTip = "Text Box";
//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 tool tip.
loadedTextBox.ToolTip = "Text Box"
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
VerticalAlignment
Gets or sets the vertical alignment of the field
Declaration
public PdfXfaVerticalAlignment VerticalAlignment { get; set; }
Property Value
Type | Description |
---|---|
PdfXfaVerticalAlignment |
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 vertical alignment of the field.
loadedTextBox.VerticalAlignment = PdfXfaVerticalAlignment.Middle;
//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 vertical alignment of the field.
loadedTextBox.VerticalAlignment = PdfXfaVerticalAlignment.Middle
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()
Width
Gets or sets the width
Declaration
public float Width { get; set; }
Property Value
Type | Description |
---|---|
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;
//Get the width of the field.
float width = loadedTextBox.Width;
//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 width of the field.
Dim width As Single = loadedTextBox.Width
'Save the document
loadedDocument.Save("output.pdf")
'Close the document
loadedDocument.Close()