Skip to content

PDF Spec Annex A

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

Annex A: Operator Summary

Part of: PDF-Spec-Annexes

Navigation: ← Previous | PDF-Spec-Index | PDF-Spec-Annex-B


Annex A

(informative)

Operator Summary

PDF 32000-1:2008

Table A.1 - PDF content stream operators (continued)

Operator PostScript Equivalent Description Table
ET End text object 107
EX (PDF 1.1) End compatibility section 32
f fill Fill path using nonzero winding number rule 60
F fill Fill path using nonzero winding number rule (obsolete) 60
f* eofill Fill path using even-odd rule 60
G setgray Set gray level for stroking operations 74
g setgray Set gray level for nonstroking operations 74
gs (PDF 1.2) Set parameters from graphics state parameter dictionary 57
h closepath Close subpath 59
i setflat Set flatness tolerance 57
ID Begin inline image data 92
j setlinejoin Set line join style 57
J setlinecap Set line cap style 57
K setcmykcolor Set CMYK color for stroking operations 74
k setcmykcolor Set CMYK color for nonstroking operations 74
l lineto Append straight line segment to path 59
m moveto Begin new subpath 59
M setmiterlimit Set miter limit 57
MP (PDF 1.2) Define marked-content point 320
n End path without filling or stroking 60
q gsave Save graphics state 57
Q grestore Restore graphics state 57
re Append rectangle to path 59
RG setrgbcolor Set RGB color for stroking operations 74
rg setrgbcolor Set RGB color for nonstroking operations 74
ri Set color rendering intent 57
s closepath, stroke Close and stroke path 60
S stroke Stroke path 60
SC setcolor (PDF 1.1) Set color for stroking operations 74
sc setcolor (PDF 1.1) Set color for nonstroking operations 74
SCN setcolor (PDF 1.2) Set color for stroking operations ( ICCBased and special colour spaces) 74
scn setcolor (PDF 1.2) Set color for nonstroking operations ( ICCBased and special colour spaces) 74

Table A.1 - PDF content stream operators (continued)

Operator PostScript Equivalent Description Table
sh shfill (PDF 1.3) Paint area defined by shading pattern 77
T* Move to start of next text line 108
Tc Set character spacing
Td Move text position 108
TD Move text position and set leading 108
Tf selectfont Set text font and size
Tj show Show text 109
TJ Show text, allowing individual glyph positioning 109
TL Set text leading
Tm Set text matrix and text line matrix 108
Tr Set text rendering mode
Ts Set text rise
Tw Set word spacing
Tz Set horizontal text scaling
v curveto Append curved segment to path (initial point replicated) 59
w setlinewidth Set line width 57
W clip Set clipping path using nonzero winding number rule 61
W* eoclip Set clipping path using even-odd rule 61
y curveto Append curved segment to path (final point replicated) 59
' Move to next line and show text 109
" Set word and character spacing, move to next line, and show text 109

PDF 32000-1:2008

THIS PAGE BLANK

B.1 General

This annex summarizes the PostScript operators that may appear in a type 4 function, as discussed in 7.10.5, "Type 4 (PostScript Calculator) Functions". For details on these operators, see the PostScript Language Reference , Third Edition.

B.2 Arithmetic Operators

num 1 num 2 add sum Return num 1 plus num 2
num 1 num 2 sub difference Return num 1 minus num 2
num 1 num 2 mul product Return num 1 times num 2
num 1 num 2 div quotient Return num 1 divided by num 2
int 1 int 2 idiv quotient Return int 1 divided by int 2 as an integer
int 1 int 2 mod remainder Return remainder after dividing int 1 by int 2
num 1 neg num 2 Return negative of num 1
num 1 abs num 2 Return absolute value of num 1
num 1 ceiling num 2 Return ceiling of num 1
num 1 floor num 2 Return floor of num 1
num 1 round num 2 Round num 1 to nearest integer
num 1 truncate num 2 Remove fractional part of num 1
num angle sqrt real sin real Return square root of num Return sine of angle degrees
angle cos real Return cosine of angle degrees
num den atan angle Return arc tangent of num / den in degrees
base exponent exp real Raise base to exponent power
num num ln real Return natural logarithm (base e )
log real Return common logarithm (base 10)
num cvi int Convert to integer
num cvr real Convert to real

B.3 Relational, Boolean, and Bitwise Operators

any 1 any 2 eq bool Test equal
any 1 any 2 ne bool Test not equal
num 1 num 2 gt bool Test greater than
num 1 num 2 ge bool Test greater than or equal
num 1 num 2 lt bool Test less than
num 1 num 2 le bool Test less than or equal
bool 1 int 1 bool 2 int 2 and
bool 1 int 1 bool 2 int 2 or
bool 1 int 1 bool 2 int 2 xor
bool 1 int 1 not bool 2

Navigation: ← Previous | PDF-Spec-Index | PDF-Spec-Annex-B

Clone this wiki locally