Previous Next


                                         198
CHAPTER 4                                                                    Graphics



For example, the path construction operators m and re signal the beginning of a
path object. Inside the path object, additional path construction operators are
permitted, as are the clipping path operators W and W*, but not general graphics
state operators such as w or J. A path-painting operator, such as S or f, ends the
path object and returns to the page description level.

Note: A content stream whose operations violate these rules for describing graphics
objects can produce unpredictable behavior, even though it may display and print
correctly. Applications that attempt to extract graphics objects for editing or other
purposes depend on the objects’ being well formed. The rules for graphics objects are
also important for the proper interpretation of marked content (see Section 10.5,
“Marked Content”).

A graphics object also implicitly includes all graphics state parameters that affect
its behavior. For instance, a path object depends on the value of the current color
parameter at the moment the path object is defined. The effect is as if this param-
eter were specified as part of the definition of the path object. However, the oper-
ators that are invoked at the page description level to set graphics state
parameters are not considered to belong to any particular graphics object. Graph-
ics state parameters need to be specified only when they change. A graphics
object may depend on parameters that were defined much earlier.

Similarly, the individual character strings within a text object implicitly include
the graphics state parameters on which they depend. Most of these parameters
may be set inside or outside the text object. The effect is as if they were separately
specified for each text string.

The important point is that there is no semantic significance to the exact arrange-
ment of graphics state operators. An application that reads and writes a PDF con-
tent stream is not required to preserve this arrangement, but is free to change it to
any other arrangement that achieves the same values of the relevant graphics state
parameters for each graphics object. An application should not infer any higher-
level logical semantics from the arrangement of tokens constituting a graphics
object. A separate mechanism, marked content (see Section 10.5, “Marked Con-
tent”), allows such higher-level information to be explicitly associated with the
graphics objects.

Previous Next