Previous Next


                                        195
SECTION 4.1                                                         Graphics Objects



• An external object (XObject) is an object defined outside the content stream
  and referenced as a named resource (see Section 3.7.2, “Resource Diction-
  aries”). The interpretation of an XObject depends on its type. An image XOb-
  ject defines a rectangular array of color samples to be painted; a form XObject is
  an entire content stream to be treated as a single graphics object. Specialized
  types of form XObjects are used to import content from one PDF file into an-
  other (reference XObjects) and to group graphical elements together as a unit
  for various purposes (group XObjects). In particular, the latter are used to de-
  fine transparency groups for use in the transparent imaging model (transparen-
  cy group XObjects, discussed in detail in Chapter 7). There is also a PostScript
  XObject, whose use is discouraged.
• An inline image object uses a special syntax to express the data for a small image
  directly within the content stream.
• A shading object describes a geometric shape whose color is an arbitrary func-
  tion of position within the shape. (A shading can also be treated as a color
  when painting other graphics objects; it is not considered to be a separate
  graphics object in that case.)

PDF 1.3 and earlier versions use an opaque imaging model in which each graphics
object is painted in sequence, completely obscuring any previous marks it may
overlay on the page. PDF 1.4 introduces a transparent imaging model in which ob-
jects can be less than fully opaque, allowing previously painted marks to show
through. Each object is painted on the page with a specified opacity, which may
be constant at every point within the object’s shape or may vary from point to
point. The previously existing contents of the page form a backdrop with which
the new object is composited, producing results that combine the colors of the
object and backdrop according to their respective opacity characteristics. The ob-
jects at any given point on the page can be thought of as forming a transparency
stack, where the stacking order is defined to be the order in which the objects are
specified, bottommost object first. All objects in the stack can potentially contrib-
ute to the result, depending on their colors, shapes, and opacities.

PDF’s graphics parameters are so arranged that objects are painted by default
with full opacity, reducing the behavior of the transparent imaging model to that
of the opaque model. Accordingly, the material in this chapter applies to both the
opaque and transparent models except where explicitly stated otherwise; the
transparent model is described in its full generality in Chapter 7.

Previous Next