DecodeText() Method

Definition

Assembly Broadside.dll

Decodes the bytes as a text string.

public string DecodeText()

Returns

String
The text.

Remarks

ISO 32000-2 §7.9.2.2 and Annex D. A string that starts with the byte order marker FE FF is UTF-16BE, one that starts with EF BB BF is UTF-8 (PDF 2.0), and any other is PDFDocEncoding (Table D.3). The marker is not part of the text. Language escape sequences in Unicode strings (§7.9.2.2.2: ESC, a two-letter language code, an optional two-letter country code, ESC) are removed. Malformed UTF-16 or UTF-8 decodes to U+FFFD; a trailing odd byte of a UTF-16BE string is ignored; the PDFDocEncoding codes Table D.3 leaves undefined decode to the Unicode code point with the same number.