officefileapi-devexpress-dot-pdf-dot-pdfpage-dot-rotatecontent-x28-system-dot-double-system-dot-double-system-dot-double-x29.md
Rotates the page content relative to the specified point. Document annotations are not rotated.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public void RotateContent(
double x,
double y,
double degree
)
Public Sub RotateContent(
x As Double,
y As Double,
degree As Double
)
| 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).
|
The RotateContent method call does not affect the page size.
The code sample below rotates the first page’s 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");
}
Using processor As New PdfDocumentProcessor()
processor.LoadDocument("Document.pdf")
Dim page As PdfPage = 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")
End Using
See Also