menu

ASP.NET MVC

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Enum PdfXfaBorderStyle

    Show / Hide Table of Contents

    Enum PdfXfaBorderStyle

    Represent XFA border style

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

    A dashed dotted rectangle surrounding.

    DashDotDot

    A dashed dotted dotted rectangle surrounding.

    Dashed

    A dashed rectangle surrounding.

    Dotted

    A dotted rectangle surrounding.

    Embossed

    Embossed rectangle surrounding.

    Etched

    Etched rectangle surrounding.

    Lowered

    A lowered rectangle surrounding.

    None

    No Border

    Raised

    Raised rectangle surrounding.

    Solid

    A solid rectangle surrounding.

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