Class PdfXfaHandedness
Represents the handness of the XFA border
Inheritance
System.Object
PdfXfaHandedness
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.UWP.dll
Syntax
public sealed class PdfXfaHandedness : Enum
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);
//Set border fill color.
border.FillColor = new PdfXfaSolidBrush(Color.Green);
//Set handedness of the border.
border.Handedness = PdfXfaHandedness.Right;
//Set the style of the border.
border.Style = PdfXfaBorderStyle.Raised;
//Set the border visibility.
border.Visibility = PdfXfaVisibility.Visible;
//Set the border with.
border.Width = 2;
//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)
'Set border fill color.
border.FillColor = New PdfXfaSolidBrush(Color.Green)
'Set handedness of the border.
border.Handedness = PdfXfaHandedness.Right
'Set the style of the border.
border.Style = PdfXfaBorderStyle.Raised
'Set the border visibility.
border.Visibility = PdfXfaVisibility.Visible
'Set the border with.
border.Width = 2
'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()
Fields
Even
Center the displayed line on the underlying vector.
Declaration
public const PdfXfaHandedness Even
Field Value
Type |
---|
PdfXfaHandedness |
Left
Position the displayed line immediately to the left of the underlying vector.
Declaration
public const PdfXfaHandedness Left
Field Value
Type |
---|
PdfXfaHandedness |
Right
Position the displayed line immediately to the right of the underlying vector.
Declaration
public const PdfXfaHandedness Right
Field Value
Type |
---|
PdfXfaHandedness |