Encodes a JavaScript string to PDFDocEncoding bytes.
PDFDocEncoding is the default encoding for PDF strings:
The string to encode.
The encoded byte array.
// Encode "Hello" (ASCII)encodeToPDFDocEncoding('Hello')// Encode with special character (bullet → 0x80)encodeToPDFDocEncoding('H•i') Copy
// Encode "Hello" (ASCII)encodeToPDFDocEncoding('Hello')// Encode with special character (bullet → 0x80)encodeToPDFDocEncoding('H•i')
Encodes a JavaScript string to PDFDocEncoding bytes.
PDFDocEncoding is the default encoding for PDF strings: