Table of Contents

Class PdfXfaEdge

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

Represents the Edge of the XFA border

public class PdfXfaEdge
Inheritance
PdfXfaEdge
Inherited Members

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.

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

public PdfXfaBorderStyle BorderStyle { get; set; }

Property Value

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

public PdfColor Color { get; set; }

Property Value

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

public float Thickness { get; set; }

Property Value

float

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

public PdfXfaVisibility Visibility { get; set; }

Property Value

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()