Escapes special characters in a PDF string according to PDF specification. Escapes parentheses, backslashes, and control characters (\n, \r, \t, \b, \f).
The byte array or string to escape.
A new byte array with escaped characters.
escapeString('Hello (World)') // Escapes the parentheses Copy
escapeString('Hello (World)') // Escapes the parentheses
Escapes special characters in a PDF string according to PDF specification. Escapes parentheses, backslashes, and control characters (\n, \r, \t, \b, \f).