WinForms

Upgrade Guide User Guide Demos Support Forums Download
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfXfaHandedness - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Enum PdfXfaHandedness

    Represents the handness of the XFA border

    Namespace: Syncfusion.Pdf.Xfa
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfXfaHandedness
    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

    Name Description
    Even

    Center the displayed line on the underlying vector.

    Left

    Position the displayed line immediately to the left of the underlying vector.

    Right

    Position the displayed line immediately to the right of the underlying vector.

    Back to top Generated by DocFX
    Copyright © 2001 - 2021 Syncfusion Inc. All Rights Reserved