Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.v24.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