Home>Knowledge Base>Articles

Graphics Operators in PDF Files

The Graphics Operators used in PDF content streams describe the appearance of pages that are to be reproduced on a raster output device. And the graphics operators form six main groups:


Graphics state operators manipulate the data structure called the graphics state, the global framework within which the other graphics operators execute. The graphics state includes the current transformation matrix (CTM), which maps user space coordinates used within a PDF content stream into output device coordinates. It also includes the current color, the current clipping path, and many other parameters that are implicit operands of the painting operators.

Path construction operators specify paths, which define shapes, line trajectories, and regions of various sorts. They include operators for beginning a new path, adding line segments and curves to it, and closing it.


Path-painting operators fill a path with a color, paint a stroke along it, or use it as a clipping boundary.


Other painting operators paint certain self-describing graphics objects. These include sampled images, geometrically defined shadings, and entire content streams that in turn contain sequences of graphics operators.


Text operators select and show character glyphs from fonts (descriptions of typefaces for representing text characters). Because PDF treats glyphs as general graphical shapes, many of the text operators could be grouped with the graphics state or painting operators.


Marked-content operators associate higher-level logical information with objects in the content stream. This information does not affect the rendered appearance of the content; it is useful to applications that use PDF for document interchange.