PDFPAGE_RotateText
IPDFDocument3 :: PDF page methods

See Also Example
Collapse All

This method rotates text to the angle specified.

Syntax

HRESULT PDFPAGE_RotateText (
DOUBLE degrees
)
Parameters
degrees
The angle (in degrees) to rotate the text.

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 text rotationĀ for all future text output operations and does not modify any text already displayed.

Equivalent in new interface: IPDFDocument4::TextAngle.

Example

Rotating Text

Delphi
[copy to clipboard]
{ PDF object is supposed to be created }
PDF.BeginDoc;
PDF.PDFPAGE_SetActiveFont('Helvetica', false, false, false, false, 14.0, 0);
PDF.PDFPAGE_SetTextPosition(20, 20);
PDF.PDFPAGE_TextShow('This text is not rotated.');
PDF.PDFPAGE_RotateText(-15);
PDF.PDFPAGE_TextShow(' This text is rotated at -15 degrees.');
PDF.EndDoc;
C/C++
[copy to clipboard]
// PDF object is supposed to be created
PDF->BeginDoc();
PDF->PDFPAGE_SetActiveFont("Helvetica", False, False, False, False, 14.0, 0);
PDF->PDFPAGE_SetTextPosition(20, 20);
PDF->PDFPAGE_TextShow("This text is not rotated.");
PDF->PDFPAGE_RotateText(-15);
PDF->PDFPAGE_TextShow(" This text is rotated at -15 degrees.");
PDF->EndDoc();
C#
[copy to clipboard]
// PDF object is supposed to be created
PDF.BeginDoc();
PDF.PDFPAGE_SetActiveFont("Helvetica", false, false, false, false, 14.0, 0);
PDF.PDFPAGE_SetTextPosition(20, 20);
PDF.PDFPAGE_TextShow("This text is not rotated.");
PDF.PDFPAGE_RotateText(-15);
PDF.PDFPAGE_TextShow(" This text is rotated at -15 degrees.");
PDF.EndDoc();
Visual Basic
[copy to clipboard]
' PDF object is supposed to be created
PDF.BeginDoc
PDF.PDFPAGE_SetActiveFont "Helvetica", False, False, False, False, 14.0, 0
PDF.PDFPAGE_SetTextPosition 20, 20
PDF.PDFPAGE_TextShow "This text is not rotated."
PDF.PDFPAGE_RotateText -15
PDF.PDFPAGE_TextShow " This text is rotated at -15 degrees."
PDF.EndDoc

See Also

Reference