pdf-lite - v1.3.0
    Preparing search index...

    Function escapeString

    • Escapes special characters in a PDF string according to PDF specification. Escapes parentheses, backslashes, and control characters (\n, \r, \t, \b, \f).

      Parameters

      • bytes: string | ByteArray

        The byte array or string to escape.

      Returns ByteArray

      A new byte array with escaped characters.

      escapeString('Hello (World)') // Escapes the parentheses