Professional Documents
Culture Documents
PDF Operators CheatSheet
PDF Operators CheatSheet
PDF Operators CheatSheet
R
curve extends from current point to the point (x 3 , y 3 ),
using (x 1 , y 1 ) and (x 3 , y 3 ) as the Bézier control points. New 0 Filled text.
Marked Content
current point is then (x 3 , y 3 ).
1 Stroked text. Marked Content Sequences and Points
Path Painting See subclause 14.6 in ISO 32000-2:2020. Introduced in PDF 1.2.
Combined fill and stroke painting must be treated as a single atomic graphics object. 2 Fill, then stroke text. EMC must be paired with either a BDC or BMC operator and nested correctly with BT/
ET text object, BX/EX compatibility operators, and q/Q paired operators.
Invisible. Neither fill nor stroke text.
3 name property BDC Begin marked-content sequence with property list.
Text will still be selectable/searchable.
Nested. name is a name object indicating the role or
4 Fill text and add to path for clipping. significance of the sequence. property is either an inline
dictionary or a name of a resource in the Properties
Non-zero Winding Rule Even-odd Winding Rule 5 Stroke text and add to path for clipping. subdictionary of the current resource dictionary.
b Close, fill, and stroke path using the non-zero winding rule. Same as: h B name BMC Begin a marked-content sequence. Nested. name is a
B 6 Fill, then stroke and add to path for clipping. name indicating the role or significance of the sequence
Fill and stroke path using the non-zero winding rule.
name property DP Define a marked-content point with property list. name
b* Close, fill, and stroke path using the even-odd winding rule. Same as: h B*
7 Add text to path for clipping. is a name object indicating the role or significance of the
B* Fill and stroke path using the even-odd winding rule. point. property is either an inline dictionary or the name
f Close all subpaths then fill the current path using non-zero winding rule. of a resource in the Properties subdictionary of the
number Ts Set text rise expressed in unscaled text space units. Initial value: 0.
f* Fill path using even-odd winding rule. current resource dictionary.
number Tw Set word spacing in unscaled text space units. Word spacing is EMC End marked-content sequence.
F Fill the current path using non-zero winding number rule.
used by Tj, TJ and ' text showing operators. Initial value: 0.
(Deprecated in PDF 2.0) name MP Define a marked-content point. tag is a name indicating
number Tz Set horizontal text scaling specified as a percentage of normal
n End path without filling or stroking (“no op”). the role or significance of the sequence
width (number > 0). Initial value: 100 (100% is normal width).
Used after W / W* operators to establish the new clipping path.
s Close and stroke the current path. Same as h S.
S Stroke the current path.
X
Pattern
space
Default user space = 1/72 inch.
number M Set the miter limit ratio. When line width is zero, the miter Color
length is zero. Equivalent to the ML entry in the graphics
a b c d e f cm
state parameter dictionary. Initial value is 10.0, for a miter Color Operators
Concatenate specified matrix to current transformation
cutoff below approx. Ɵ = 11.5°. UPPERCASE = stroking
matrix. Operands are numbers. Matrix is:
𝑎𝑎 𝑏𝑏 0 lowercase = filling (non-stroking)
� 𝑐𝑐 𝑑𝑑 0 � Miter
length
𝑒𝑒 𝑓𝑓 1
Initial value is a matrix that transforms default user
coordinates (1/ 72 inch) into device coordinates. RGB CMYK
name CS (PDF 1.1) Set color space for stroking (CS) or non-
Graphics State Parameters name cs stroking (cs) operations. If the color space is one that
[on off …] phase d Set stroking dash pattern to the specified dash array (on, can be specified by a name and no additional
Line width
off, on, … - numbers) and dash phase (number). Equivalent parameters (DeviceGray, DeviceRGB, DeviceCMYK,
to the D entry in the graphics state parameter dictionary. 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙ℎ 1 and certain cases of Pattern), that name may be
Initial value is [] (solid undashed line). 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟𝑟 = = specified directly. Otherwise, name is a resource in
𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤ℎ 𝜃𝜃
sin 2 the ColorSpace subdictionary of the current resource
q Save graphics state (“push”). Nested. dictionary. Initial color space is DeviceGray.
[3] 0
3 on, 3 off, … Needs to be paired with a Q operator. gray G Set gray level for stroking (G) or non-stroking (g)
gray g operations. 0.0 (black) ≤ gray ≤ 1.0 (white)
Q Restore graphics state (“pop”).
[2 1 3] -2
name ri c m y k K Set CMYK levels for stroking (K) or non-stroking (k)
2 off, 2 on, 1 off, 3 on, 2 off, 1 on, 3 off, … Set the color render intent in the graphics state. intent is a
c m y k k operations. 0.0 ≤ c, m, y, k ≤ 1.0
name and usually one of AbsoluteColorimetric,
name gs (PDF 1.2) Set parameters from the named graphics state RelativeColorimetric, Saturation, or r g b RG Set RGB levels for stroking (RG) or non-stroking (rg)
parameter dictionary. name is the name of a graphics Perceptual. Equivalent to the RI entry in the graphics r g b rg operations. 0.0 (no color) ≤ r, g, b ≤ 1.0 (max. color)
state parameter dictionary in the ExtGState subdictionary state parameter dictionary. Initial value is C1 … Cn SC (PDF 1.1) Set the color to use for stroking operations
of the current resource dictionary. RelativeColorimetric. C1 … Cn sc (SC) or non-stroking (sc) to CIE-based (other than
number i Set flatness tolerance to number. Equivalent to the FL number w Set line width to number in user space units (number ≥ 0). ICCBased), or Indexed color space. The number of
entry in the graphics state parameter dictionary. Initial Initial value is 1.0. operands required, and their interpretation depends
value is 1.0. on the current stroking/non-stroking color space:
style j (Lowercase “J”) Set line join style (integer). Equivalent to For DeviceGray, CalGray, and Indexed color spaces,
the LJ entry in the graphics state parameter dictionary.
Initial value is 0 (miter join).
Other operators one operand is required (n = 1).
For DeviceRGB, CalRGB, and Lab color spaces, three
operands are required (n = 3).
Inline Images
Style Name Appearance For DeviceCMYK, four operands are required (n = 4)
Only for very small images (<4KB). Otherwise use Image XObject and Do operator. C1 … Cn SCN (PDF 1.2) Same as SC/sc operators but also for
BI Begin inline image object. Followed by Image XObject dictionary key value pairs. C1 … Cn SCN Pattern, Separation, DeviceN and ICCBased color
0 Miter join Certain key names and values may also be abbreviated. Abbreviated key names name spaces. If the current stroking (SCN) or non-stroking
take precedence over full key names. scn (scn) color space is a Separation, DeviceN, or
ID Begin inline image data after a single whitespace character. C1 … Cn scn ICCBased color space, the operands C 1 … C n are
EI Ends an inline image object. C1 … Cn numbers.
1 Round join name The number of operands and their interpretation
Object painting depends on the color space.
If the current color space is a Pattern color space,
name Do Invoke (paint) the named XObject. name is the name of an XObject that is in then name is the name of an entry in the Pattern
the XObject subdictionary of the current resource dictionary. subdictionary of the current resource dictionary.
2 Bevel join
name sh (PDF 1.3) Paint area defined by a shading pattern. name is the name of a For an uncolored tiling pattern (PatternType=1 and
shading dictionary resource in the Shading subdictionary of the current PaintType=2), C 1 … C n are component values
resource dictionary. specifying a color in the pattern’s underlying color
space. For other types of patterns, these operands
are not specified.
Date:
2023.08.2
3 13:11:58 © 2023, PDF Association, https://www.pdfa.org (v1.20)
-04'00'