int32_t __stdcall pdfGetBidiMode(PPDF IPDF);
BOOL32 __stdcall pdfSetBidiMode(PPDF IPDF, int32_t Mode);
function pdfGetBidiMode(const IPDF: PPDF): Integer; stdcall;
function pdfSetBidiMode(const IPDF: PPDF; Mode: Integer): LongBool; stdcall;
Purpose. Set/get the bidirectional (RTL/Hebrew/Arabic) text reordering mode applied to subsequently-written text.
Description. Real: FBidiMode (default 2, an explicit DIFF from the classic API's bmNone default) is genuinely consulted in the text-write path — when not bmNone (Ord = 0), logical-order input text is passed through BidiReorder before glyph encoding, with the reorder direction selected by whether the mode is bmRightToLeft. pdfSetBidiMode clamps out-of-range input (< 0 or > 2) to 1, rather than rejecting it.
Parameters.
| Parameter | Description |
|---|---|
IPDF | Document handle. |
Mode | 0=bmNone (no reordering), 1=bmLeftToRight, 2=bmRightToLeft (default); out-of-range values clamp to 1, not rejected. |
Return value. Getter: the current mode; 0 if IPDF invalid. Setter: True if IPDF valid.
See also. pdfIsBidiText (a related bidi-detection utility).
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Setters
pdfSetBidiMode
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.