Previous Next


                                                    52
      CHAPTER 3                                                                      Syntax



      The following sections describe each object type, as well as how to create and
      refer to indirect objects.


3.2.1 Boolean Objects

      PDF provides boolean objects identified by the keywords true and false. Boolean
      objects can be used as the values of array elements and dictionary entries, and can
      also occur in PostScript calculator functions as the results of boolean and
      relational operators and as operands to the conditional operators if and ifelse (see
      Section 3.9.4, “Type 4 (PostScript Calculator) Functions”).


3.2.2 Numeric Objects

      PDF provides two types of numeric objects: integer and real. Integer objects rep-
      resent mathematical integers within a certain interval centered at 0. Real objects
      approximate mathematical real numbers, but with limited range and precision;
      they are typically represented in fixed-point form rather than floating-point
      form. The range and precision of numbers are limited by the internal
      representations used in the computer on which the PDF consumer application is
      running; Appendix C gives these limits for typical implementations.

      An integer is written as one or more decimal digits optionally preceded by a sign:

         123    43445   +17   −98     0

      The value is interpreted as a signed decimal integer and is converted to an integer
      object. If it exceeds the implementation limit for integers, it is converted to a real
      object.

      A real value is written as one or more decimal digits with an optional sign and a
      leading, trailing, or embedded period (decimal point):

         34.5   −3.62   +123.6   4.   −.002   0.0

      The value is interpreted as a real number and is converted to a real object. If it
      exceeds the implementation limit for real numbers, an error occurs.

      Note: PDF does not support the PostScript syntax for numbers with nondecimal
      radices (such as 16#FFFE) or in exponential format (such as 6.02E23).

Previous Next