| Category | Text introspection |
|---|---|
| Note | a coarse Unicode-range heuristic, not a full bidi-class analysis (see Remarks) |
Purpose — Quick check for whether AText contains any characters from a right-to-left script block.
Description — Scans every UTF-16 code unit and returns true as soon as one falls in U+0590..U+08FF (Hebrew, Arabic, Syriac, Thaana, NKo, Samaritan, Mandaic, and adjacent blocks), U+FB1D..U+FDFF (Hebrew/Arabic presentation forms A), or U+FE70..U+FEFF (Arabic presentation forms B).
Declarations
int32_t __stdcall pdfIsBidiText(PPDF IPDF, const wchar_t* AText);
function pdfIsBidiText(const IPDF: PPDF; const AText: PWideChar): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle (only checked for validity — the result doesn't depend on document state). |
AText | PWideChar | Text to scan. NULL returns 0. |
Return value — 1 if any code unit falls in the scanned ranges; 0 otherwise (including NULL/empty input or an invalid handle).
Remarks — This is a fixed code-block range check, not a full Unicode Bidi_Class property lookup (UAX#9) — it will correctly flag Hebrew/Arabic text but does not attempt to classify weak/neutral characters or other RTL-adjacent scripts outside these specific ranges. For the actual reordering logic driven by FBidiMode, see pdfWriteText's Unicode robustness table.
See also — pdfWriteText
C# (P/Invoke)
public static extern int pdfIsBidiText(IntPtr IPDF, [MarshalAs(UnmanagedType.LPWStr)] string AText);
Core
pdfIsBidiText
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.