SetTextDirection
IPDFDocument4 :: Page Operations :: Text

See Also
Collapse All

This method sets the direction of text for the current PDF page.

Syntax

HRESULT SetTextDirection (
TextDirection textDirection
)
Parameters
textDirection
New text direction value

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

Remarks

Use this method when you need to print some right-to-left text in a PDF document.

For example, if you want to place a Hebrew or Arabic (or else right-to-left) text in a PDF, then call:

fnt = PDF.AddFont(fontName, false, false, false, false, codePage);
PDF.UseFont(fnt, fontSize);
PDF.SetTextDirection(tdRightToLeft);
PDF.ShowTextAt 10, 20, "Right to left text is here. And 123 digits.";

And it will draw a string:

.stigid 123 dnA .ereh si txet tfel ot thgiR 

(We assume that the string was not in English but in Arabic, Hebrew or other language with right-to-left direction.)

See Also

Reference