Class PdfDocEncoding
PDFDocEncoding (ISO 32000-2, Annex D.3) used for text strings outside content streams.
public static class PdfDocEncoding
- Inheritance
-
PdfDocEncoding
- Inherited Members
Methods
CanEncode(string)
Returns true if every character of text is representable.
public static bool CanEncode(string text)
Parameters
textstring
Returns
GetBytes(string)
Encodes text in PDFDocEncoding (one byte per UTF-16 char); characters that cannot be
represented become '?'. Use CanEncode(string) to check beforehand.
public static byte[] GetBytes(string text)
Parameters
textstring
Returns
- byte[]
GetString(ReadOnlySpan<byte>)
Decodes PDFDocEncoding bytes; the undefined codes 0x9F and 0xAD become U+FFFD.
public static string GetString(ReadOnlySpan<byte> bytes)
Parameters
bytesReadOnlySpan<byte>