DynaPDF Manual - Page 690

Previous Page 689   Index   Next Page 691

Function Reference
Page 690 of 839
SetBidiMode
Syntax:
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
bmNone
= 2
// Default -> do not apply the bidi algorithm
}TPDFBidiMode;
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.
Remarks:
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.
Notice:
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: Bounding boxes:, SetBidiMode

Next topic: SetBookmarkDest