Class PdfXfaEdge
Represents the Edge of the XFA border
Inheritance
System.Object
PdfXfaEdge
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 PdfXfaEdge
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Constructors
PdfXfaEdge()
Initialize a new instance of the PdfXfaEdge class.
Declaration
public PdfXfaEdge()
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Properties
BorderStyle
Gets or sets the border style
Declaration
public PdfXfaBorderStyle BorderStyle { get; set; }
Property Value
Type |
---|
PdfXfaBorderStyle |
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Color
Gets or sets the border color
Declaration
public PdfColor Color { get; set; }
Property Value
Type |
---|
PdfColor |
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Thickness
Gets or sets the thickness of the edge
Declaration
public float Thickness { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()
Visibility
Gets or sets the visibility
Declaration
public PdfXfaVisibility Visibility { get; set; }
Property Value
Type |
---|
PdfXfaVisibility |
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Add a new XFA page.
PdfXfaPage xfaPage = document.Pages.Add();
//Create a new PDF XFA form
PdfXfaForm mainForm = new PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width);
//Create a textbox field and add the properties.
PdfXfaTextBoxField textBoxField = new PdfXfaTextBoxField("FirstName", new SizeF(200, 20));
//Set caption text.
textBoxField.Caption.Text = "First Name";
//Create new PDF XFA border instance.
PdfXfaBorder border = new PdfXfaBorder(Color.Red);
//Create new PDF XFA edge instance.
PdfXfaEdge edge = new PdfXfaEdge();
//Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered;
//Set edge color.
edge.Color = Color.HotPink;
//Set edge thickness.
edge.Thickness = 2;
//Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible;
//Set the edge to XFA border.
border.TopEdge = edge;
//Set border to text box field.
textBoxField.Border = border;
//Add the field to the XFA form.
mainForm.Fields.Add(textBoxField);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic);
//close the document
document.Close();
'Create a new PDF XFA document.
Dim document As New PdfXfaDocument()
'Add a new XFA page.
Dim xfaPage As PdfXfaPage = document.Pages.Add()
'Create a new PDF XFA form
Dim mainForm As New PdfXfaForm("subform1", xfaPage, xfaPage.GetClientSize().Width)
'Create a textbox field and add the properties.
Dim textBoxField As New PdfXfaTextBoxField("FirstName", New SizeF(200, 20))
'Set caption text.
textBoxField.Caption.Text = "First Name"
'Create new PDF XFA border instance.
Dim border As New PdfXfaBorder(Color.Red)
'Create new PDF XFA edge instance.
Dim edge As New PdfXfaEdge()
'Set edge border style.
edge.BorderStyle = PdfXfaBorderStyle.Lowered
'Set edge color.
edge.Color = Color.HotPink
'Set edge thickness.
edge.Thickness = 2
'Set edge visibility.
edge.Visibility = PdfXfaVisibility.Visible
'Set the edge to XFA border.
border.TopEdge = edge
'Set border to text box field.
textBoxField.Border = border
'Add the field to the XFA form.
mainForm.Fields.Add(textBoxField)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'close the document
document.Close()