Xojo Conferences

DynaPDF Manual - Page 627

Previous Page 626   Index   Next Page 628

Function Reference
Page 627 of 766
LBOOL pdfSetBidiMode(
const PPDF* IPDF,
// Instance pointer
TPDFBidiMode Mode) // Bidirectional mode
typedef enum
bmLeftToRight = 0, // Apply the bidi algorithm in Left to Right layout
bmRightToLeft = 1, // Apply the bidi algorithm in Right to Left layout
= 2
// Default -> do not apply the bidi algorithm
The function 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
bmNone (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 bmNone.
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 mfApplyBidiAlgo with SetMetaConvFlags().
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: SetBidiMode

Next topic: SetBookmarkDest