Table of Contents

Enum PdfPageRotateAngle

Namespace
Syncfusion.Pdf
Assembly
Syncfusion.Pdf.Portable.dll

The number of degrees by which the page should be rotated clockwise when displayed or printed.

public enum PdfPageRotateAngle

Fields

RotateAngle0 = 0

The page is rotated as 0 angle.

RotateAngle180 = 2

The page is rotated as 180 angle.

RotateAngle270 = 3

The page is rotated as 270 angle.

RotateAngle90 = 1

The page is rotated as 90 angle.

Examples

//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Set rotation angle.
document.PageSettings.Rotate = PdfPageRotateAngle.RotateAngle90;
//Add a page to the document.
PdfPage page = document.Pages.Add();
//Create PDF graphics for the page.
PdfGraphics graphics = page.Graphics;
//Create the PDF font instance.
PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 20);
//Draw the text.
graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, new PointF(0, 0));
//Save the document to disk.
document.Save("Output.pdf");
//Close the document.
document.Close(true);
'Create a new PDF document.
Dim document As PdfDocument = New PdfDocument()
'Set rotation angle.
document.PageSettings.Rotate = PdfPageRotateAngle.RotateAngle90
'Add a page to the document.
Dim page As PdfPage = document.Pages.Add()
'Create PDF graphics for the page.
Dim graphics As PdfGraphics = page.Graphics
'Create the PDF font instance.
Dim font As PdfFont = New PdfStandardFont(PdfFontFamily.Helvetica, 20)
'Draw the text.
graphics.DrawString("Hello World!!!", font, PdfBrushes.Black, New PointF(0, 0))
'Save the document to disk.
document.Save("Output.pdf")
'Close the document.
document.Close(True)

Remarks

To know more details about document settings refer this link.

See Also