THPDFPage.ShowUnicodeText Method
Shows a run of Unicode text, or of hexadecimal character codes, at the current text position within a BeginText / EndText block, with optional right-to-left processing. Use it when you build the text object yourself; TextOut covers the ordinary case
Declaration
type
THPDFShowTextFormat= (stfAuto, stfUnicode, stfHex);
procedure ShowUnicodeText(Text: WideString; HasRTLChars: boolean= false;
HexIsGlyphIDs: boolean= false; AutoDetectRTL: boolean= True;
TextFormat: THPDFShowTextFormat= stfAuto);
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
Text | The characters to show, or a string of four-digit hexadecimal units when TextFormat selects or detects hexadecimal input |
HasRTLChars | Forces right-to-left processing of the run |
HexIsGlyphIDs | With hexadecimal input, states that the units are glyph IDs of the current font rather than code points, so they are not inspected for right-to-left characters |
AutoDetectRTL | Detects right-to-left content when HasRTLChars is false |
TextFormat | stfUnicode always shows Text as characters; stfHex always reads it as four-digit hexadecimal units; stfAuto (the default) reads it as hexadecimal only when it consists of hex digits in whole four-digit units |
Return value
This member returns no value
Usage notes
- Set
HasRTLCharsto force right-to-left processing for a known RTL run - Set
AutoDetectRTLto false when the caller has already resolved the paragraph base direction - Paragraph layout uses this explicit mode, so a secondary RTL run cannot override an LTR first-strong character
- Pass
stfUnicodefor ordinary text: understfAuto, a four-letter or four-digit word made up of hex digits, such as'2024'or'CAFE', is read as a single hexadecimal code - Characters are written as the current font's character codes, the way
TextOutwrites them, and the glyphs they use are retained in the embedded subset