Escapes special characters in a PDF string according to PDF specification. Escapes parentheses, backslashes, line feeds, and carriage returns.
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, line feeds, and carriage returns.