Skip to content

PDF20 Spec 08 Graphics Objects

Marc Jones edited this page Dec 30, 2025 · 1 revision

8.4 Graphics Objects

Part of: PDF20-Spec-08-Graphics

Navigation: PDF20-Spec-08-Graphics-State | PDF20-Spec-Index | PDF20-Spec-08-Path-Construction


8.4

When rendering graphics objects, it is sometimes necessary for a PDF reader to perform the inverse of a transformation — that is, to find the user space coordinates that correspond to a given pair of device space coordinates. Not all transformations are invertible, however. For example, if a matrix contains a, b, c, and d elements that are all zero, all user coordinates map to the same device coordinates and there is no unique inverse transformation. Such noninvertible transformations are not very useful and generally arise from unintended operations, such as scaling by 0. Use of a noninvertible matrix when painting graphics objects can result in unpredictable behaviour.

Graphics state

8.4.1 General A PDF processor shall maintain an internal data structure called the graphics state that holds current graphics control parameters. These parameters define the global framework within which the graphics operators execute. EXAMPLE 1

The f (fill) operator implicitly uses the current colour parameter, and the S (stroke) operator additionally uses the current line width parameter from the graphics state.

A PDF processor shall initialise the graphics state at the beginning of each page with the values specified in "Table 51 — Device-independent graphics state parameters" and "Table 52 — Devicedependent graphics state parameters". "Table 51 — Device-independent graphics state parameters" lists those graphics state parameters that are device-independent and are appropriate to specify in page descriptions. The parameters listed in "Table 52 — Device-dependent graphics state parameters" control details of the rendering (scan conversion) process and are device-dependent; a page 156

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

description that is intended to be device-independent should not be written to modify these parameters. Table 51 — Device-independent graphics state parameters Parameter

Type

Value

CTM

array

The current transformation matrix, which maps positions from user coordinates to device coordinates (see 8.3, "Coordinate systems"). This matrix is modified by each application of the coordinate transformation operator, cm. Initial value: a matrix that transforms default user coordinates to device coordinates.

clipping path

(internal)

The current clipping path, which defines the boundary against which all output shall be cropped (see 8.5.4, "Clipping path operators"). Initial value: the size of the MediaBox.

color space

name or array

The current colour space in which colour values shall be interpreted (see 8.6, "Colour spaces"). There are two separate colour space parameters: one for stroking and one for all other painting operations. Initial value: DeviceGray.

color

(various)

The current colour that shall be used during painting operations (see 8.6, "Colour spaces"). The type and interpretation of this parameter depend on the current colour space; for most colour spaces, a colour value consists of one to four numbers. There are two separate colour parameters: one for stroking and one for all other painting operations. Initial value: black.

text state

(various)

A set of nine graphics state parameters that pertain only to the painting of text. These include parameters that select the font, scale the glyphs to an appropriate size, and accomplish other effects. The text state parameters are described in 9.3, "Text state parameters and operators".

line width

number

The thickness, in user space units, of paths to be stroked (see 8.4.3.2, "Line width"). Initial value: 1.0.

line cap

integer

A code specifying the shape of the start and endcaps for an open stroked path or the caps at both ends of dashes in a stroked path (see 8.4.3.3, "Line cap style"). Initial value: 0, for butt caps.

line join

integer

A code specifying the shape of joints between connected segments of a stroked path ("see 8.4.3.4, "Line join style"). Initial value: 0, for mitered joins.

miter limit

number

The miter limit imposes a maximum on the ratio of the miter length to the line width. When the limit is exceeded, the join is converted from a miter to a bevel (see 8.4.3.5, "Miter limit"). This parameter limits the length of "spikes" produced when line segments join at sharp angles. Initial value: 10.0, for a miter cutoff below approximately 11.5 degrees.

dash pattern

array and number

A description of the dash pattern that shall be used when paths are stroked (see 8.4.3.6, "Line dash pattern"). Initial value: [] 0, a solid line.

rendering intent

name

The rendering intent that shall be used when converting CIE-based colours to device colours (see 8.6.5.8, "Rendering intents"). Initial value: RelativeColorimetric.

© ISO 2020 – All rights reserved

157

ISO 32000-2:2020(E)

Parameter

Type

Value

stroke adjustment

boolean

(PDF 1.2) A flag specifying whether to compensate for possible rasterization effects when stroking a path with a line width that is small relative to the pixel resolution of the output device (see 10.7.5, "Automatic stroke adjustment"). NOTE

This is considered a device-independent parameter, even though the details of its effects are device-dependent.

Initial value: false. blend mode

name or (PDF 1.4, array is deprecated in PDF 2.0) The current blend mode that shall array be used in the transparent imaging model (see 11.3.5, "Blend mode"). A PDF reader shall implicitly reset this parameter to its initial value at the (array is deprecated beginning of execution of a transparency group XObject (see 11.6.6, in PDF 2.0) "Transparency group XObjects"). The value shall be either a name object, designating one of the standard blend modes listed in "Table 134 — Standard separable blend modes" and "Table 135 — Standard non-separable blend modes" in 11.3.5, "Blend mode", or an array of such names. In the latter case, the PDF reader shall use the first blend mode in the array that it recognises (or Normal if it recognises none of them). Initial value: Normal.

soft mask

dictionary (PDF 1.4) A soft-mask dictionary (see 11.6.5.1, "Soft-mask dictionaries") specifying the mask shape or mask opacity values that shall be used in the or name transparent imaging model (see 11.3.7.2, "Source shape and opacity" and 11.6.4.3, "Mask shape and opacity"), or the name None if no such mask is specified. A PDF reader shall implicitly reset this parameter to its initial value at the beginning of execution of a transparency group XObject (see 11.6.6, "Transparency group XObjects"). Initial value: None.

alpha constant

number

(PDF 1.4) The constant shape or constant opacity value that shall be used in the transparent imaging model (see 11.3.7.2, "Source shape and opacity" and 11.6.4.4, "Constant shape and opacity"). There are two separate alpha constant parameters: one for stroking and one for all other painting operations. A PDF reader shall implicitly reset this parameter to its initial value at the beginning of execution of a transparency group XObject (see 11.6.6, "Transparency group XObjects"). Initial value: 1.0.

alpha source

boolean

(PDF 1.4) A flag specifying whether the current soft mask and alpha constant parameters shall be interpreted as shape values (true) or opacity values (false). This flag also governs the interpretation of the SMask entry, if any, in an image dictionary (see 8.9.5, "Image dictionaries"). Initial value: false.

black point compensation

name

(PDF 2.0) The black point compensation algorithm that shall be used when converting CIE-based colours (see 8.6.5.9, "Use of black point compensation"). Initial value: Default.

158

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

Table 52 — Device-dependent graphics state parameters Parameter

Type

Value

overprint

boolean

(PDF 1.2) A flag specifying (on output devices that support the overprint control feature) whether painting in one set of colourants should cause the corresponding areas of other colourants to be erased (false) or left unchanged (true); see 8.6.7, "Overprint control". PDF 1.3, introduced two separate overprint parameters: one for stroking and one for all other painting operations. Initial value: false.

overprint mode

number

(PDF 1.3) A code specifying whether a colour component value of 0 in a DeviceCMYK colour space should erase that component (0) or leave it unchanged (1) when overprinting (see 8.6.7, "Overprint control"). Initial value: 0.

black generation

function or name

(PDF 1.2) A function that calculates the level of the black colour component to use when converting RGB colours to CMYK (see 10.4.2.4, "Conversion from DeviceRGB to DeviceCMYK"). Initial value: a PDF reader shall initialise this to a suitable device dependent value.

undercolor removal

function or name

(PDF 1.2) A function that calculates the reduction in the levels of the cyan, magenta, and yellow colour components to compensate for the amount of black added by black generation (see 10.4.2.4, "Conversion from DeviceRGB to DeviceCMYK"). Initial value: a PDF reader shall initialise this to a suitable device dependent value.

transfer

function, name, or array

(PDF 1.2, deprecated in PDF 2.0) A function that adjusts device gray or colour component levels to compensate for nonlinear response in a particular output device (see 10.5, "Transfer functions"). Initial value: a PDF reader shall initialise this to a suitable device dependent value.

halftone

dictionary, stream, or name

(PDF 1.2) A halftone screen for gray and colour rendering, specified as a halftone dictionary or stream (see 10.6, "Halftones"). Initial value: a PDF reader shall initialise this to a suitable device dependent value.

flatness

number

The precision with which curves shall be rendered on the output device (see 10.7.2, "Flatness tolerance"). The value of this parameter (positive number) gives the maximum error tolerance, measured in output device pixels; smaller numbers give smoother curves at the expense of more computation and memory use. Initial value: 1.0.

smoothness

number

(PDF 1.3) The precision with which colour gradients are to be rendered on the output device (see 10.7.3, "Smoothness tolerance"). The value of this parameter (0 to 1.0) gives the maximum error tolerance, expressed as a fraction of the range of each colour component; smaller numbers give smoother colour transitions at the expense of more computation and memory use. Initial value: a PDF reader shall initialise this to a suitable device dependent value.

NOTE 1 EXAMPLE 2

Some graphics state parameters are set with specific PDF operators, some are set by including a particular entry in a graphics state parameter dictionary, and some can be specified either way. The current line width can be set either with the w operator or (in PDF 1.3) with the LW entry in a graphics state parameter dictionary, whereas the current colour is set only with specific operators, and the current

© ISO 2020 – All rights reserved

159

ISO 32000-2:2020(E)

halftone is set only with a graphics state parameter dictionary.

In general, a PDF processor, when interpreting the operators that set graphics state parameters, shall simply store them unchanged for later use when interpreting the painting operators. However, some parameters have special properties or call for behaviour that a PDF processor shall handle: •

Most parameters shall be of the correct type or have values that fall within a certain range.

•

Parameters that are numeric values, such as the current colour, line width, and miter limit, shall be clipped into valid range, if necessary. However, they shall not be adjusted to reflect capabilities of the raster output device, such as resolution or number of distinguishable colours. Painting operators perform such adjustments, but the adjusted values shall not be stored back into the graphics state.

•

Paths shall be internal objects that shall not be directly represented in PDF.

NOTE 2

As indicated in "Table 51 — Device-independent graphics state parameters" and "Table 52 — Device-dependent graphics state parameters", some of the parameters — colour space, colour, and overprint — have two values, one used for stroking (of paths and text objects) and one for all other painting operations. The two parameter values can be set independently, allowing for operations such as combined filling and stroking of the same path with different colours. Except where noted, a term such as current colour is to be interpreted to refer to whichever colour parameter applies to the operation being performed. When necessary, the individual colour parameters are distinguished explicitly as the stroking colour and the nonstroking colour.

8.4.2 Graphics state stack A PDF document typically contains many graphical elements that are independent of each other and nested to multiple levels. The graphics state stack allows these elements to make local changes to the graphics state without disturbing the graphics state of the surrounding environment. The stack is a LIFO (last in, first out) data structure in which the contents of the graphics state may be saved and later restored using the following operators: •

The q operator shall push a copy of the entire graphics state onto the stack.

•

The Q operator shall restore the entire graphics state to its former value by popping it from the stack.

NOTE

These operators can be used to encapsulate a graphical element so that it can modify parameters of the graphics state and later restore them to their previous values.

Occurrences of the q and Q operators shall be balanced within a given content stream (or within the sequence of streams specified in a page dictionary’s Contents array).

8.4.3 Details of graphics state parameters 8.4.3.1

General

This subclause gives details of several of the device-independent graphics state parameters listed in "Table 51 — Device-independent graphics state parameters".

8.4.3.2

Line width

The line width parameter specifies the thickness of the line used to stroke a path. It shall be a nonnegative number expressed in user space units; stroking a path shall entail painting all points whose perpendicular distance from the path in user space is less than or equal to half the line width. The 160

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

effect produced in device space depends on the current transformation matrix (CTM) in effect at the time the path is stroked. If the CTM specifies scaling by different factors in the horizontal and vertical dimensions, the thickness of stroked lines in device space shall vary according to their orientation. The actual line width achieved can differ from the requested width by as much as 2 device pixels, depending on the positions of lines with respect to the pixel grid. Automatic stroke adjustment may be used to ensure uniform line width; see 10.7.5, "Automatic stroke adjustment". A line width of 0 shall denote the thinnest line that can be rendered at device resolution: 1 device pixel wide. However, some devices cannot reproduce 1-pixel lines, and on high-resolution devices, they are nearly invisible. Since the results of rendering such zero-width lines are device-dependent, they should not be used.

8.4.3.3

Line cap style

The line cap style shall specify the shape that shall be used at both ends of open subpaths (and dashes 8.4.3.6, "Line dash pattern") when they are stroked. "Table 53 — Line cap styles" shows the allowed values. Table 53 — Line cap styles Style

Appearance

Description

0

Butt cap. The stroke shall be squared off at the endpoint of the path. There shall be no projection beyond the end of the path.

1

Round cap. A semicircular arc with a diameter equal to the line width shall be drawn around the endpoint and shall be filled in.

2

Projecting square cap. The stroke shall continue beyond the endpoint of the path for a distance equal to half the line width and shall be squared off.

8.4.3.4

Line join style

The line join style shall specify the shape to be used at the corners of paths that are stroked. "Table 54 — Line join styles" shows the allowed values. Join styles shall be significant only at points where consecutive segments of a path connect at an angle; segments that meet or intersect fortuitously shall receive no special treatment. Table 54 — Line join styles Style

Appearance

0

© ISO 2020 – All rights reserved

Description Miter join. The outer edges of the strokes for the two segments shall be extended until they meet at an angle, as in a picture frame. If the segments meet at too sharp an angle (as defined by the miter limit parameter — see 8.4.3.5, "Miter limit"), a bevel join shall be used instead.

161

ISO 32000-2:2020(E)

Style

Appearance

Description

1

Round join. An arc of a circle with a diameter equal to the line width shall be drawn around the point where the two segments meet, connecting the outer edges of the strokes for the two segments. This pie-slice-shaped figure shall be filled in, producing a rounded corner.

2

Bevel join. The two segments shall be finished with butt caps (see 8.4.3.3, "Line cap style") and the resulting notch beyond the ends of the segments shall be filled with a triangle.

A zero length dash occurring at a zero length subpath segment does not have a determinable direction and thus, if the line caps are non-round is rendered in an implementation-dependent manner. In a closed subpath that is dashed, if the first segment starts with an on-dash and the last segment ends within an on-dash, then they shall be joined. NOTE

8.4.3.5

The definition of round join was changed in PDF 1.5. In rare cases, the implementation of the previous specification could produce unexpected results.

Miter limit

When two line segments meet at a sharp angle and mitered joins have been specified as the line join style, it is possible for the miter to extend far beyond the thickness of the line stroking the path. The miter limit shall impose a maximum on the ratio of the miter length to the line width (see "Figure 15 — Miter length"). When the limit is exceeded, the join is converted from a miter to a bevel. The ratio of miter length to line width is directly related to the angle j between the segments in user space by the following formula: 𝑚𝑖𝑡𝑒𝑟𝐿𝑒𝑛𝑔𝑡ℎ 1

𝑗 𝑙𝑖𝑛𝑒𝑊𝑖𝑑𝑡ℎ sin 2 When the line width is zero, the miter length is zero. NOTE EXAMPLE

162

Very large miter lengths are allowed. A miter limit of 1.414 converts miters to bevels for j less than 90 degrees, a limit of 2.0 converts them for j

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

less than 60 degrees, and a limit of 10.0 converts them for j less than approximately 11.5 degrees.

Figure 15 — Miter length

8.4.3.6

Line dash pattern

The line dash pattern shall control the pattern of dashes and gaps used to stroke paths. It shall be specified by a dash array and a dash phase. The dash array’s elements shall be numbers that specify the lengths of alternating dashes and gaps; the numbers shall be nonnegative and not all zero. The dash phase shall be a number that specifies the distance into the dash pattern at which to start the dash. If the dash phase is negative, it shall be incremented by twice the sum of all lengths in the dash array until it is positive. The elements of both the dash array and the dash phase shall be expressed in user space units. Before beginning to stroke a path, the dash array shall be cycled through, adding up the lengths of dashes and gaps. When the accumulated length equals the value specified by the dash phase, stroking of the path shall begin, and the dash array shall be used cyclically from that point onward. "Table 55 — Examples of line dash patterns" shows examples of line dash patterns. If the dash array is empty, the dash phase shall be zero and the path shall be stroked with a solid, unbroken line. Table 55 — Examples of line dash patterns Dash Array and Phase

Appearance

Description

[] 0

No dash; solid, unbroken lines

[3] 0

3 units on, 3 units off, …

[2] 1

1 on, 2 off, 2 on, 2 off, …

[2 1] 0

2 on, 1 off, 2 on, 1 off, …

[3 5] 6

2 off, 3 on, 5 off, 3 on, 5 off, …

[2 3] 11

1 on, 3 off, 2 on, 3 off, 2 on, …

[2 1 3] 0

2 on, 1 off, 3 on, 2 off, 1 on, 3 off, 2 on, …

[2 1 3] -2

2 off, 2 on, 1 off, 3 on, 2 off, 1 on, 3 off, …

© ISO 2020 – All rights reserved

163

ISO 32000-2:2020(E)

Dashed lines shall wrap around curves and corners just as solid stroked lines do. The ends of each dash shall be treated with the current line cap style, and corners within dashes shall be treated with the current line join style. The treatment of overlapping line caps shall follow the rules given in 11.6.2, "Specifying source and backdrop colours". A stroking operation shall take no measures to coordinate the dash pattern with features of the path; it simply shall dispense dashes and gaps along the path in the pattern defined by the dash array. If the end of a dashed segment coincides exactly with a join point, then the end cap is painted before the corner. When a path consisting of several subpaths is stroked, each subpath shall be treated independently — that is, the dash pattern shall be restarted and the dash phase shall be reapplied to it at the beginning of each subpath. NOTE

As noted in 8.5.3.2, "Stroking" and in "Table 58 — Path construction operators", closed paths have no end caps, but the individual dash segments of a path stroked using a non-empty line dash pattern are individually open paths and therefore receive end cap processing as specified in the graphics state. If any dash segment includes a corner then that corner is painted using the current join style in the graphics state. If a corner is not contained within any dashed segment the corner is not painted.

8.4.4 Graphics state operators "Table 56 — Graphics state operators" shows the operators that set the values of parameters in the graphics state. (See also the colour operators listed in "Table 73 — Colour operators" and the text state operators in "Table 103 — Text state operators".) Table 56 — Graphics state operators Operands

Operator

Description

—

q

Save the current graphics state on the graphics state stack (see 8.4.2, "Graphics state stack").

—

Q

Restore the graphics state by removing the most recently saved state from the stack and making it the current state (see 8.4.2, "Graphics state stack").

abcdef

cm

Modify the current transformation matrix (CTM) by concatenating the specified matrix (see 8.3.2, "Coordinate spaces"). Although the operands specify a matrix, they shall be written as six separate numbers, not as an array.

lineWidth

w

Set the line width in the graphics state (see 8.4.3.2, "Line width").

lineCap

J

Set the line cap style in the graphics state (see 8.4.3.3, "Line cap style").

lineJoin

j

Set the line join style in the graphics state (see 8.4.3.4, "Line join style").

miterLimit

M

Set the miter limit in the graphics state (see 8.4.3.5, "Miter limit").

dashArray dashPhase

d

Set the line dash pattern in the graphics state (see 8.4.3.6, "Line dash pattern").

intent

ri

(PDF 1.1) Set the colour rendering intent in the graphics state (see 8.6.5.8, "Rendering intents").

164

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

Operands

Operator

Description

flatness

i

Set the flatness tolerance in the graphics state (see 10.7.2, "Flatness tolerance"). flatness is a number in the range 0 to 100; a value of 0 shall specify the output device’s default flatness tolerance.

dictName

gs

(PDF 1.2) Set the specified parameters in the graphics state. dictName shall be the name of a graphics state parameter dictionary in the ExtGState subdictionary of the current resource dictionary (see the next subclause).

8.4.5 Graphics state parameter dictionaries While some parameters in the graphics state may be set with individual operators, as shown in "Table 56 — Graphics state operators", others may not. The latter may only be set with the generic graphics state operator gs (PDF 1.2). The operand supplied to this operator shall be the name of a graphics state parameter dictionary whose contents specify the values of one or more graphics state parameters. This name shall be looked up in the ExtGState subdictionary of the current resource dictionary. The graphics state parameter dictionary is also used by Type 2 patterns, which do not have a content stream in which the graphics state operators could be invoked (see 8.7.4, "Shading patterns"). Each entry in the parameter dictionary shall specify the value of an individual graphics state parameter, as shown in "Table 57 — Entries in a graphics state parameter dictionary". All entries need not be present for every invocation of the gs operator; the supplied parameter dictionary may include any combination of parameter entries. The results of gs shall be cumulative; parameter values established in previous invocations persist until explicitly overridden. NOTE

Note that some parameters appear in both "Table 56 — Graphics state operators" and "Table 57 — Entries in a graphics state parameter dictionary"; these parameters can be set either with individual graphics state operators or with gs. It is expected that any future extensions to the graphics state will be implemented by adding new entries to the graphics state parameter dictionary rather than by introducing new graphics state operators.

Table 57 — Entries in a graphics state parameter dictionary Key

Type

Value

Type

name

(Optional) The type of PDF object that this dictionary describes; shall be ExtGState for a graphics state parameter dictionary.

LW

number

(Optional; PDF 1.3) The line width (see 8.4.3.2, "Line width").

LC

integer

(Optional; PDF 1.3) The line cap style (see 8.4.3.3, "Line cap style").

LJ

integer

(Optional; PDF 1.3) The line join style (see 8.4.3.4, "Line join style").

ML

number

(Optional; PDF 1.3) The miter limit (see 8.4.3.5, "Miter limit").

D

array

(Optional; PDF 1.3) The line dash pattern, expressed as an array of the form [dashArray dashPhase], where dashArray shall be itself an array and dashPhase shall be a number (see 8.4.3.6, "Line dash pattern").

© ISO 2020 – All rights reserved

165

ISO 32000-2:2020(E)

Key

Type

Value

RI

name

(Optional; PDF 1.3) The name of the rendering intent (see 8.6.5.8, "Rendering intents").

OP

boolean

(Optional) A flag specifying whether to apply overprint (see 8.6.7, "Overprint control"). In PDF 1.2 and earlier, there is a single overprint parameter that applies to all painting operations. Beginning with PDF 1.3, two separate overprint parameters were defined: one for stroking and one for all other painting operations. Specifying an OP entry shall set both parameters unless there is also an op entry in the same graphics state parameter dictionary, in which case the OP entry shall set only the overprint parameter for stroking.

op

boolean

(Optional; PDF 1.3) A flag specifying whether to apply overprint (see 8.6.7, "Overprint control") for painting operations other than stroking. If this entry is absent, the OP entry, if any, shall also set this parameter.

OPM

integer

(Optional; PDF 1.3) The overprint mode (see 8.6.7, "Overprint control").

Font

array

(Optional; PDF 1.3) An array of the form [font size], where font shall be an indirect reference to a font dictionary and size shall be a number expressed in text space units. These two objects correspond to the operands of the Tf operator (see 9.3, "Text state parameters and operators"); however, the first operand shall be an indirect object reference instead of a resource name.

BG

function

(Optional) The black-generation function, which maps the interval [0.0 1.0] to the interval [0.0 1.0] (see 10.4.2.4, "Conversion from DeviceRGB to DeviceCMYK").

BG2

function or (Optional; PDF 1.3) Same as BG except that the value may also be the name Default, denoting the black-generation function that was in effect at the start name of the page. If both BG and BG2 are present in the same graphics state parameter dictionary, BG2 shall take precedence.

UCR

function

UCR2

function or (Optional; PDF 1.3) Same as UCR except that the value may also be the name Default, denoting the undercolour-removal function that was in effect at the name start of the page. If both UCR and UCR2 are present in the same graphics state parameter dictionary, UCR2 shall take precedence.

TR

function, name, or array

(Optional, deprecated in PDF 2.0) The transfer function, which maps the interval [0.0 1.0] to the interval [0.0 1.0] (see 10.5, "Transfer functions"). The value shall be either a single function (which applies to all process colourants) or an array of four functions (which apply to the process colourants individually). The name Identity may be used to represent the Identity function.

TR2

function, name, or array

(Optional; PDF 1.3, deprecated in PDF 2.0) Same as TR except that the value may also be the name Default, denoting the transfer function that was in effect at the start of the page. If both TR and TR2 are present in the same graphics state parameter dictionary, TR2 shall take precedence.

HT

dictionary, stream, or name

(Optional) The halftone dictionary or stream (see 10.6, "Halftones") or the name Default, denoting the halftone that was in effect at the start of the page.

166

(Optional) The undercolour-removal function, which maps the interval [0.0 1.0] to the interval [−1.0 1.0] (see 10.4.2.4, "Conversion from DeviceRGB to DeviceCMYK").

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

Key

Type

Value

FL

number

(Optional; PDF 1.3) The flatness tolerance (see 10.7.2, "Flatness tolerance").

SM

number

(Optional; PDF 1.3) The smoothness tolerance (see 10.7.3, "Smoothness tolerance").

SA

boolean

(Optional) A flag specifying whether to apply automatic stroke adjustment (see 10.7.5, "Automatic stroke adjustment").

BM

name or (Optional; PDF 1.4; array is deprecated in PDF 2.0) The current blend mode array that shall be used in the transparent imaging model (see 11.3.5, "Blend mode"). (array is deprecated in PDF 2.0)

SMask

dictionary or name

(Optional; PDF 1.4) The current soft mask, specifying the mask shape or mask opacity values that shall be used in the transparent imaging model (see 11.3.7.2, "Source shape and opacity" and 11.6.4.3, "Mask shape and opacity"). Although the current soft mask is sometimes referred to as a "soft clip", altering it with the gs operator completely replaces the old value with the new one, rather than intersecting the two as is done with the current clipping path parameter (see 8.5.4, "Clipping path operators").

CA

number

(Optional; PDF 1.4) The current stroking alpha constant, specifying the constant shape or constant opacity value that shall be used for stroking operations in the transparent imaging model (see 11.3.7.2, "Source shape and opacity" and 11.6.4.4, "Constant shape and opacity").

ca

number

(Optional; PDF 1.4) Same as CA, but for nonstroking operations.

AIS

boolean

(Optional; PDF 1.4) The alpha source flag ("alpha is shape"), specifying whether the current soft mask and alpha constant shall be interpreted as shape values (true) or opacity values (false). This flag also governs the interpretation of the SMask entry, if any, in an image dictionary (see 8.9.5, "Image dictionaries").

TK

boolean

(Optional; PDF 1.4) The text knockout flag, shall determine the behaviour of overlapping glyphs within a text object in the transparent imaging model (see 9.3.8, "Text knockout"). This flag controls the behavior of glyphs obtained from any font type, including Type 3.

UseBlackPtComp

name

(Optional; PDF 2.0) This graphics state parameter controls whether black point compensation is performed while doing CIE-based colour conversions. It shall be set to either OFF, ON or Default. The semantics of Default are up to the PDF processor. See 8.6.5.9, "Use of black point compensation". The default value is: Default.

© ISO 2020 – All rights reserved

167

ISO 32000-2:2020(E)

Key

Type

Value

HTO

array

(Optional; PDF 2.0) Halftone origin, specified as an array of two numbers specifying the X and Y location of the halftone origin in the current coordinate system. Although the numbers are specified in the current coordinate system, changes to the current coordinate system (for example as a result of invocation of a form XObject) do not move the halftone origin relative to the underlying device coordinate system. NOTE: The HTO key is very similar to the HTP key defined in PDF versions up to PDF 1.3 (1st Edition), but differs in the coordinate system used.

EXAMPLE

168

The following shows two graphics state parameter dictionaries. In the first, automatic stroke adjustment is turned on, and the dictionary includes a transfer function (deprecated in PDF 2.0) that inverts its value, 𝑓 (𝑥) = 1 − 𝑥. In the second, overprint is turned off, and the dictionary includes a parabolic transfer function (deprecated in PDF 2.0), 𝑓 (𝑥) = (2𝑥 − 1)2, with a sample of 21 values. The domain of the transfer function, [0.0 1.0], is mapped to [0 20], and the range of the sample values, [0 255], is mapped to the range of the transfer function, [0.0 1.0].

10 0 obj <</Type /Page /Parent 5 0 R /Resources 20 0 R /Contents 40 0 R

endobj

%Page object

20 0 obj <</Font <</F1 25 0 R>> /ExtGState <</GS1 30 0 R /GS2 35 0 R

endobj

%Resource dictionary for page

30 0 obj <</Type /ExtGState /SA true /TR 31 0 R

endobj

%First graphics state parameter dictionary

31 0 obj <</FunctionType 0 /Domain [0.0 1.0] /Range [0.0 1.0] /Size 2 /BitsPerSample 8 /Length 7 /Filter /ASCIIHexDecode

stream 01 00> endstream endobj

%First transfer function

35 0 obj <</Type /ExtGState /OP false /TR 36 0 R

endobj

%Second graphics state parameter dictionary

© ISO 2020 – All rights reserved

ISO 32000-2:2020(E)

36 0 obj %Second transfer function <</FunctionType 0 /Domain [0.0 1.0] /Range [0.0 1.0] /Size 21 /BitsPerSample 8 /Length 63 /Filter /ASCIIHexDecode

stream FF CE A3 7C 5B 3F 28 16 0A 02 00 02 0A 16 28 3F 5B 7C A3 CE FF> endstream endobj


Navigation: PDF20-Spec-08-Graphics-State | PDF20-Spec-Index | PDF20-Spec-08-Path-Construction

Clone this wiki locally