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

    Function escapeString

    • Escapes special characters in a PDF string according to PDF specification. Escapes parentheses, backslashes, line feeds, and carriage returns.

      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