WinForms

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

    Show / Hide Table of Contents

    Enum PdfPageRotateAngle

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

    Namespace: Syncfusion.Pdf
    Assembly: Syncfusion.Pdf.Base.dll
    Syntax
    public enum PdfPageRotateAngle
    Remarks

    To know more details about document settings refer this link.

    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)

    Fields

    Name Description
    RotateAngle0

    The page is rotated as 0 angle.

    RotateAngle180

    The page is rotated as 180 angle.

    RotateAngle270

    The page is rotated as 270 angle.

    RotateAngle90

    The page is rotated as 90 angle.

    See Also
    PdfDocument
    PdfPage
    PdfPageSettings
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved