Previous Next


                                                  59
      SECTION 3.2                                                                 Objects



3.2.6 Dictionary Objects

      A dictionary object is an associative table containing pairs of objects, known as
      the dictionary’s entries. The first element of each entry is the key and the second
      element is the value. The key must be a name (unlike dictionary keys in
      PostScript, which may be objects of any type). The value can be any kind of
      object, including another dictionary. A dictionary entry whose value is null (see
      Section 3.2.8, “Null Object”) is equivalent to an absent entry. (This differs from
      PostScript, where null behaves like any other object as the value of a dictionary
      entry.) The number of entries in a dictionary is subject to an implementation
      limit; see Appendix C.

      Note: No two entries in the same dictionary should have the same key. If a key does
      appear more than once, its value is undefined.

      A dictionary is written as a sequence of key-value pairs enclosed in double angle
      brackets (<< … >>). For example:

        << /Type /Example
           /Subtype /DictionaryExample
           /Version 0 . 01
           /IntegerItem 12
           /StringItem ( a string )
           /Subdictionary << /Item1 0 . 4
                                /Item2 true
                                /LastItem ( not ! )
                                /VeryLastItem ( OK )
                            >>
        >>

      Note: Do not confuse the double angle brackets with single angle brackets (< and >),
      which delimit a hexadecimal string (see “Hexadecimal Strings” on page 56).

      Dictionary objects are the main building blocks of a PDF document. They are
      commonly used to collect and tie together the attributes of a complex object, such
      as a font or a page of the document, with each entry in the dictionary specifying
      the name and value of an attribute. By convention, the Type entry of such a
      dictionary identifies the type of object the dictionary describes. In some cases, a
      Subtype entry (sometimes abbreviated S) is used to further identify a specialized
      subcategory of the general type. The value of the Type or Subtype entry is always

Previous Next