Previous Next


                                               157
      SECTION 3.8                                                    Common Data Structures



3.8.1 String Types

      PDF supports the string and text string types. Beginning with PDF 1.7, the string
      type is further qualified as PDFDocEncoded string, ASCII string, or byte string.
      The further qualification reflects the encoding used to represent the characters or
      glyphs described by the string.

      Table 3.32 summarizes the string types. These types are not true types. Rather,
      they are versions of the string type that represent data encoded using specific
      conventions.

                                    TABLE 3.32 String Types
      TYPE                    DESCRIPTION

      string                  For PDF 1.6 and earlier, this type is used for any string that can-
                              not be represented as a text string. Beginning with PDF 1.7, this
                              type is further qualified as ASCII string, PDFDocEncoded
                              string, and byte string.

      text string             Used for human-readable characters, such as text annotations,
                              bookmark names, article names, and document information.
                              These strings are encoded using either PDFDocEncoding or
                              UTF-16BE with a leading byte-order marker.
                              This type is described in “Text String Type” on page 158.

      PDFDocEncoded string (PDF 1.7) Used for characters and glyphs that are represented in
                           a single byte, using PDFDocEncoding. This type, which reflects
                           a more specific encoding than the text string type, is described
                           in “PDFDocEncoded String Type” on page 159.

      ASCII string            (PDF 1.7) Used for characters that are represented in a single
                              byte using ASCII encoding.

      byte string             (PDF 1.7) Used for binary data represented as a series of 8-bit
                              bytes, where each byte can be any value representable in 8 bits.
                              The string may represent characters or glyphs but the encoding
                              is not known. The bytes of the string may not represent charac-
                              ters. This type is used for data such as MD5 hash values, signa-
                              ture certificates, and Web Capture identification values.
                              This type is described in “Byte String Type” on page 159.

Previous Next