Skip to main content
All docs
V23.2

PdfPage.RotateContent(Double, Double, Double) Method

Rotates the page content relative to the specified point. Document annotations are not rotated.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v23.2.Core.dll

NuGet Package: DevExpress.Pdf.Core

Declaration

public void RotateContent(
    double x,
    double y,
    double degree
)

Parameters

Name Type Description
x Double

The point’s X coordinate in the page coordinate system.

y Double

The point’s Y coordinate in the page coordinate system.

degree Double

The degree of rotation (from 0 to 360).

Remarks

The RotateContent method call does not affect the page size.

Example

The code sample below rotates the first page’s content:

rotated content

using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
    processor.LoadDocument(@"Document.pdf");
    PdfPage page = processor.Document.Pages[0];

    // Scale content to fit it
    // on the first page after rotation
    page.ScaleContent(0.5, 0.5);
    page.RotateContent(200,100, 270);
    processor.SaveDocument("result.pdf");
}
See Also