Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.SetBidiMode

Sets or changes the bidirectional mode.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.SetBidiMode"; PDF; Mode )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Mode Bidirectional mode.
Can be LeftToRight, RightToLeft or None.
"LeftToRight"

Result

Returns OK or error.

Description

Sets or changes the bidirectional mode.
When using a bidirectional 8 bit code page the bidirectional algorithm is applied by default in Left to Right mode also if the bidi mode is set to
None (default). This mode produces identical results in comparison to applications like Edit or WordPad from Microsoft Windows.
If the current font was loaded with the code page cpUnicode the bidirectional algorithm is applied only if the bidi mode is not set to None.

DynaPDF uses internally the Reference Bidi Algorithm of the Unicode Consortium to process bidirectional strings. The algorithm supports the entire UCS-2 range and it is used by many applications. However, the Right to Left mode produces different results in comparison to Microsoft's Uniscribe. If you need the same result in Right to Left mode as Uniscribe would produce then you must pre-process the strings with this library and output the resulting Unicode strings with disabled bidirectional algorithm. The font must be loaded with the code page cpUnicode in this
case.

The bidi mode is ignored during EMF conversion. To enable the bidirectional algorithm during EMF
conversion you must set the flag ApplyBidiAlgo with DynaPDF.SetMetaConvFlags.

See also SetBidiMode function in DynaPDF manual.

Examples

Set right to left:

Set Variable [ $r; Value: MBS( "DynaPDF.SetBidiMode"; $PDF; "RightToLeft" ) ]

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 10th April 2025, last changed 10th April 2025


DynaPDF.SetBBox - DynaPDF.SetBookmarkDest