PDFPAGE_Rotate
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method rotates graphics counterclockwise to the angle specified.

Syntax

HRESULT PDFPAGE_Rotate (
DOUBLE angle
)
Parameters
angle
The angle (in degrees) to rotate the graphics.

Return value
If successful, this method returns S_OK. If it fails, this method should return one of the error values.

Remarks

This method applies the graphics rotation for all future drawing operations and does not modify any graphics already displayed.

Equivalent in new interface: IPDFDocument4::RotateCoords.

Example

Rotating the Canvas

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_Rectangle(100, 100, 400, 300);
PDF.PDFPAGE_Stroke;
PDF.PDFPAGE_Rotate(-20);
PDF.PDFPAGE_Rectangle(100, 350, 400, 550);
PDF.PDFPAGE_Stroke;
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_Rectangle(100, 100, 400, 300);
PDF->PDFPAGE_Stroke();
PDF->PDFPAGE_Rotate(-20);
PDF->PDFPAGE_Rectangle(100, 350, 400, 550);
PDF->PDFPAGE_Stroke();
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_Rectangle(100, 100, 400, 300);
PDF.PDFPAGE_Stroke();
PDF.PDFPAGE_Rotate(-20);
PDF.PDFPAGE_Rectangle(100, 350, 400, 550);
PDF.PDFPAGE_Stroke();
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_Rectangle 100, 100, 400, 300
PDF.PDFPAGE_Stroke
PDF.PDFPAGE_Rotate -20
PDF.PDFPAGE_Rectangle 100, 350, 400, 550
PDF.PDFPAGE_Stroke
PDF.EndDoc

See Also

Reference