Enum PdfXfaCornerShape
Specifies the corner shapes
Namespace: Syncfusion.Pdf.Xfa
Assembly: Syncfusion.Pdf.Base.dll
Syntax
public enum PdfXfaCornerShape
Examples
//Create a new PDF XFA document.
PdfXfaDocument document = new PdfXfaDocument();
//Create a form.
PdfXfaForm parentForm = new PdfXfaForm(PdfXfaFlowDirection.Vertical, 595);
parentForm.Margins.All = 10;
//Create new XFA rectangle instance.
PdfXfaRectangleField rect = new PdfXfaRectangleField("rect1", new SizeF(200, 100));
//Create a new corner instance.
PdfXfaCorner corner = new PdfXfaCorner();
//Set inverted.
corner.IsInverted = true;
//Set corner shape.
corner.Shape = PdfXfaCornerShape.Round;
//Set corner thickness
corner.Thickness = 5;
//Set corner border color.
corner.BorderColor = Color.Green;
//Set the corner border style.
corner.BorderStyle = PdfXfaBorderStyle.Solid;
//Set the radius of the corner.
corner.Radius = 5f;
//Set the visibility of the corner.
corner.Visibility = PdfXfaVisibility.Visible;
//Set the corner of the rectangle
rect.Corner = corner;
//Set the border style.
rect.Border.Style = PdfXfaBorderStyle.Solid;
//Set rectangle border width.
rect.Border.Width = 5;
//Set the linear brush
rect.Border.FillColor = new PdfXfaLinearBrush(Color.Red, Color.Yellow);
//Add the field to form.
parentForm.Fields.Add(rect);
document.XfaForm = parentForm;
//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()
'Create a form.
Dim parentForm As New PdfXfaForm(PdfXfaFlowDirection.Vertical, 595)
parentForm.Margins.All = 10
'Create new XFA rectangle instance.
Dim rect As New PdfXfaRectangleField("rect1", New SizeF(200, 100))
'Create a new corner instance.
Dim corner As New PdfXfaCorner()
'Set inverted.
corner.IsInverted = True
'Set corner shape.
corner.Shape = PdfXfaCornerShape.Round
'Set corner thickness
corner.Thickness = 5
'Set corner border color.
corner.BorderColor = Color.Green
'Set the corner border style.
corner.BorderStyle = PdfXfaBorderStyle.Solid
'Set the radius of the corner.
corner.Radius = 5F
'Set the visibility of the corner.
corner.Visibility = PdfXfaVisibility.Visible
'Set the corner of the rectangle
rect.Corner = corner
'Set the border style.
rect.Border.Style = PdfXfaBorderStyle.Solid
'Set rectangle border width.
rect.Border.Width = 5
'Set the linear brush
rect.Border.FillColor = New PdfXfaLinearBrush(Color.Red, Color.Yellow)
'Add the field to form.
parentForm.Fields.Add(rect)
document.XfaForm = parentForm
'Save the document.
document.Save("output.pdf", PdfXfaType.Dynamic)
'Close the document
document.Close()
Fields
Name | Description |
---|---|
Round | Rounded corner |
Square | Squared corner |