API referenceCore SDK

pdfGetBidiMode

Set/get the bidirectional (RTL/Hebrew/Arabic) text

C
int32_t __stdcall pdfGetBidiMode(PPDF IPDF);
BOOL32 __stdcall pdfSetBidiMode(PPDF IPDF, int32_t Mode);
Delphi
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.

ParameterDescription
IPDFDocument handle.
Mode0=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)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetBidiMode(IntPtr IPDF);
Area
Core SDK
Category

Getters

Exported names

pdfGetBidiMode

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.