Enum PdfXfaRotateAngle
- Namespace
- Syncfusion.Pdf.Xfa
- Assembly
- Syncfusion.Pdf.Portable.dll
The number of degrees by which the field should be rotated clockwise when displayed or printed.
public enum PdfXfaRotateAngle
Fields
RotateAngle0 = 0
Indicates 0 degree rotation angle.
RotateAngle180 = 2
Indicates 180 degree rotation angle.
RotateAngle270 = 3
Indicates 270 degree rotation angle.
RotateAngle90 = 1
Indicates 90 degree rotation angle.
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 rectangle field and add the properties.
PdfXfaRectangleField rectangle = new PdfXfaRectangleField("rect1", new SizeF(100, 50));
//Set the fill color
rectangle.Border.FillColor = new PdfXfaSolidBrush(Color.Red);
//Set rotation.
rectangnle.Rotate = PdfXfaRotateAngle.RotateAngle90;
//Add the rectangle field to the XFA form.
mainForm.Fields.Add(rectangle);
//Add the XFA form to the document.
document.XfaForm = mainForm;
//Save the document.
document.Save("XfaForm.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 rectangle field and add the properties.
Dim rectangle As New PdfXfaRectangleField("rect1", New SizeF(100,50))
'Set the fill color
rectangle.Border.FillColor = New PdfXfaSolidBrush(Color.Red)
'Set rotation.
rectangnle.Rotate = PdfXfaRotateAngle.RotateAngle90
'Add the rectangle field to the XFA form.
mainForm.Fields.Add(rectangle)
'Add the XFA form to the document.
document.XfaForm = mainForm
'Save the document.
document.Save("XfaForm.pdf",PdfXfaType.Dynamic)
'close the document
document.Close()