
Adobe Acrobat SDK
Working with Cos Objects
Developing Plug-ins and Applications
About Cos object types 180
Literal strings
A literal string is written as an arbitrary number of characters enclosed in parentheses. Any characters may
appear in a string except unbalanced parentheses and the backslashes, which must be treated specially.
Balanced pairs of parentheses within a string require no special treatment.
The following are examples of literal strings:
(This is a string)
(Strings may contain newlines
and such)
(Strings may contain balanced parentheses ( ) and
special characters (*!&}^% and so on).)
(The following is an empty string.)
()
(It has zero (0) length.)
Within a literal string, the backslash (\) is used as an escape character for various purposes, such as
including newline characters, nonprinting ASCII characters, unbalanced parentheses, or the backslash
character itself in the string. The character immediately following the backslash determines its precise
interpretation. If the character following the backslash is not one of those shown in the following table, the
backslash is ignored. The following table shows valid literal string escape sequences.
If a string is too long to be conveniently placed on a single line, it may be split across multiple lines by
using the backslash character at the end of a line to indicate that the string continues on the following line.
The backslash and the end-of-line marker following it are not considered part of the string. For example,
the following strings examples are equivalent:
(These \
two strings \
are the same.)
(These two strings are the same.)
Escape sequence
Description
\n
Line feed (LF)
\r
Carriage return (CR)
\t
Horizontal tab (HT)
\b
Backspace (BS)
\f
Form feed (FF)
\(
Left parenthesis
\)
Right parenthesis
\\
Backslash
\ddd
Character code ddd (octal)