├── Figure 9 - Graphic objects.png └── README.md /Figure 9 - Graphic objects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MeiKatz/pdfjs-docs/c233b401130c66ef1cd43f0f51a6dac30e87aab2/Figure 9 - Graphic objects.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Documentation of the core of Mozilla's PDF.js library 2 | ## Operations 3 | ### Preliminary mark 4 | The list of operations contains all operations as defined in the PDF Specification that are used in PDF.js, aside with the operations that are only defined by PDF.js. The first group of operations show the operator, operands and description as defined in the PDF Specification. In the second group I tried to describe the operations as good as possible. 5 | 6 | ### Overview 7 | ![Graphic objects](https://github.com/MeiKatz/pdfjs-docs/blob/master/Figure%209%20-%20Graphic%20objects.png "Graphic objects") 8 | 9 | (Copyright Adobe Systems Incorporated / Extracted from the PDF Specification: Figure 9 - Graphic objects) 10 | 11 | #### General graphics state 12 | * [`setLineWidth`](#2-setlinewidth-w) (`w`) 13 | * [`setLineCap`](#3-setlinecap-j) (`J`) 14 | * [`setLineJoin`](#4-setlinejoin-j) (`j`) 15 | * [`setMiterLimit`](#5-setmiterlimit-m) (`M`) 16 | * [`setDash`](#6-setdash-d) (`d`) 17 | * [`setRenderingIntent`](#7-setrenderingintent-ri) (`ri`) 18 | * [`setFlatness`](#8-setflatness-i) (`i`) 19 | * [`setGState`](#9-setgstate-gs) (`gs`) 20 | 21 | #### Special graphics state 22 | * [`save`](#10-save-q) (`q`) 23 | * [`restore`](#11-restore-q) (`Q`) 24 | * [`transform`](#12-transform-cm) (`cm`) 25 | 26 | #### Path construction 27 | * [`moveTo`](#13-moveto-m) (`m`) 28 | * [`lineTo`](#14-lineto-l) (`l`) 29 | * [`curveTo`](#15-curveto-c) (`c`) 30 | * [`curveTo2`](#16-curveto2-v) (`v`) 31 | * [`curveTo3`](#17-curveto3-y) (`y`) 32 | * [`closePath`](#18-closepath-h) (`h`) 33 | * [`rectangle`](#19-rectangle-re) (`re`) 34 | 35 | #### Path painting 36 | * [`stroke`](#20-stroke-s) (`S`) 37 | * [`closeStroke`](#21-closestroke-s) (`s`) 38 | * [`fill`](#22-fill-f--f) (`f` / `F`) 39 | * [`eoFill`](#23-eofill-f) (`f*`) 40 | * [`fillStroke`](#24-fillstroke-b) (`B`) 41 | * [`eoFillStroke`](#25-eofill-stroke-b) (`B*`) 42 | * [`closeFillStroke`](#26-closefillstroke-b) (`b`) 43 | * [`closeEOFillStroke`](#27-closeeofillstroke-b) (`b*`) 44 | * [`endPath`](#28-endpath-n) (`n`) 45 | 46 | #### Clipping paths 47 | * [`clip`](#29-clip-w) (`W`) 48 | * [`eoClip`](#30-eoclip-w) (`W*`) 49 | 50 | #### Text objects 51 | * [`beginnText`](#31-beginntext-bt) (`BT`) 52 | * [`endText`](#32-endtext-et) (`ET`) 53 | 54 | #### Text state 55 | * [`setCharSpacing`](#33-setcharspacing-tc) (`Tc`) 56 | * [`setWordSpacing`](#34-setwordspacing-tw) (`Tw`) 57 | * [`setHScale`](#35-sethscale-tz) (`Tz`) 58 | * [`setLeading`](#36-setleading-tl) (`TL`) 59 | * [`setFont`](#37-setfont-tf) (`Tf`) 60 | * [`setTextRenderingMode`](#38-settextrenderingmode-tr) (`Tr`) 61 | * [`setTextRise`](#39-settextrise-ts) (`Ts`) 62 | 63 | #### Text positioning 64 | * [`moveText`](#40-movetext-td) (`Td`) 65 | * [`setLeadingMoveText`](#41-setleadingmovetext-td) (`TD`) 66 | * [`setTextMatrix`](#42-settextmatrix-tm) (`Tm`) 67 | * [`nextLine`](#43-nextline-t) (`T*`) 68 | 69 | #### Text showing 70 | * [`showText`](#44-showtext-tj) (`Tj`) 71 | * [`showSpacedText`](#45-showspacedtext-tj) (`TJ`) 72 | * [`nextLineShowText`](#46-nextlineshowtext-) (`'`) 73 | * [`nextLineSetSpacingShowText`](#47-nextlinesetspacingshowtext-) (`"`) 74 | 75 | #### Type 3 fonts 76 | * [`setCharWidth`](#48-setcharwidth-d0) (`d0`) 77 | * [`setCharWidthAndBounds`](#49-setcharwidthandbounds-d1) (`d1`) 78 | 79 | #### Color 80 | * [`setStrokeColorSpace`](#50-setstrokecolorspace-cs) (`CS`) 81 | * [`setFillColorSpace`](#51-setfillcolorspace-cs) (`cs`) 82 | * [`setStrokeColor`](#52-setstrokecolor-sc) (`SC`) 83 | * [`setStrokeColorN`](#53-setstrokecolorn-scn) (`SCN`) 84 | * [`setFillColor`](#54-setfillcolor-sc) (`sc`) 85 | * [`setFillColorN`](#55-setfillcolorn-scn) (`scn`) 86 | * [`setStrokeGray`](#56-setstrokegray-g) (`G`) 87 | * [`setFillGray`](#57-setfillgray-g) (`g`) 88 | * [`setStrokeRGBColor`](#58-setstrokergbcolor-rg) (`RG`) 89 | * [`setFillRGBColor`](#59-setfillrgbcolor-rg) (`rg`) 90 | * [`setStrokeCMYKColor`](#60-setstrokecmykcolor-k) (`K`) 91 | * [`setFillCMYKColor`](#61-setfillcmykcolor-k) (`k`) 92 | 93 | #### Shading patterns 94 | * [`shadingFill`](#62-shadingfill-sh) (`sh`) 95 | 96 | #### Inline images 97 | * [`beginInlineImage`](#63-begininlineimage-bi) (`BI`) 98 | * [`beginImageData`](#64-beginimagedata-id) (`ID`) 99 | * [`endInlineImage`](#65-endinlineimage-ei) (`EI`) 100 | 101 | #### XObjects 102 | * [`paintXObject`](#66-paintxobject-do) (`Do`) 103 | 104 | #### Marked content 105 | * [`markPoint`](#67-markpoint-mp) (`MP`) 106 | * [`markPointProps`](#68-markpointprops-dp) (`DP`) 107 | * [`beginMarkedContent`](#69-beginmarkedcontent-bmc) (`BMC`) 108 | * [`beginMarkedContentProps`](#70-beginmarkedcontentprops-bdc) (`BDC`) 109 | * [`endMarkedContent`](#71-endmarkedcontent-emc) (`EMC`) 110 | 111 | #### Compatibility 112 | * [`beginCompat`](#72-begincompat-bx) (`BX`) 113 | * [`endCompat`](#73-endcompat-ex) (`EX`) 114 | 115 | #### PDF.js only 116 | * [`dependency`](#1-dependency) 117 | * [`paintFormXObjectBegin`](#74-paintformxobjectbegin) 118 | * [`paintFormXObjectEnd`](#75-paintformxobjectend) 119 | * [`beginGroup`](#76-begingroup) 120 | * [`endGroup`](#77-endgroup) 121 | * [`beginAnnotations`](#78-beginannotations) 122 | * [`endAnnotations`](#79-endannotations) 123 | * [`beginAnnotation`](#80-beginannotation) 124 | * [`endAnnotation`](#81-endannotation) 125 | * [`paintJpegXObject`](#82-paintjpegxobject) 126 | * [`paintImageMaskXObject`](#83-paintimagemaskxobject) 127 | * [`paintImageMaskXObjectGroup`](#84-paintimagemaskxobjectgroup) 128 | * [`paintImageXObject`](#85-paintimagexobject) 129 | * [`paintInlineImageXObject`](#86-paintinlineimagexobject) 130 | * [`paintInlineImageXObjectGroup`](#87-paintinlineimagexobjectgroup) 131 | * [`paintImageXObjectRepeat`](#88-paintimagexobjectrepeat) 132 | * [`paintImageMaskXObjectRepeat`](#89-paintimagemaskxobjectrepeat) 133 | * [`paintSolidColorImageMask`](#90-paintsolidcolorimagemask) 134 | * [`constructPath`](#91-constructpath) 135 | 136 | ### 1: dependency 137 | * `dependencies`: *`array`* - list of dependency object ids 138 | 139 | ### 2: setLineWidth (`w`) 140 | #### Operands 141 | * `lineWidth`: *`number`* 142 | 143 | #### PDF Specification 144 | Set the line width in the graphics state. 145 | 146 | #### Source 147 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 148 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2823](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2823) 149 | 150 | ### 3: setLineCap (`J`) 151 | #### Operands 152 | * `lineCap`: *`number`* - either `0` (butt), `1` (round), or `2` (square) 153 | 154 | #### PDF Specification 155 | Set the line cap style in the graphics state. 156 | 157 | #### Source 158 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 159 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2824](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2824) 160 | * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineCap 161 | 162 | ### 4: setLineJoin (`j`) 163 | #### Operands 164 | * `lineJoin`: *`number`* - either `0` (miter), `1` (round), or `2` (bevel) 165 | 166 | #### PDF Specification 167 | Set the line join style in the graphics state. 168 | 169 | #### Source 170 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 171 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2825](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2825) 172 | * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineJoin 173 | 174 | ### 5: setMiterLimit (`M`) 175 | #### Operands 176 | * `miterLimit`: *`number`* 177 | 178 | #### PDF Specification 179 | Set the miter limit in the graphics state. 180 | 181 | #### Source 182 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 183 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2826](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2826) 184 | * https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/miterLimit 185 | 186 | ### 6: setDash (`d`) 187 | #### Operands 188 | * `dashArray`: *`array`* - An array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated; 189 | 190 | see also: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash 191 | * `dashPhase`: *`number`* - A float specifying the amount of the offset; 192 | 193 | see also: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset 194 | 195 | #### PDF Specification 196 | Set the line dash pattern in the graphics state. 197 | 198 | #### Source 199 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 200 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2827](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2827) 201 | 202 | ### 7: setRenderingIntent (`ri`) 203 | #### Operands 204 | * `intent`: ? 205 | 206 | #### PDF Specification 207 | Set the colour rendering intent in the graphics state. 208 | 209 | #### Source 210 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 211 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2828](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2828) 212 | 213 | ### 8: setFlatness (`i`) 214 | #### Operands 215 | * `flatness`: *`number`* 216 | 217 | #### PDF Specification 218 | Set the flatness tolerance in the graphics state. `flatness` is a number in the range `0` to `100`; a value of `0` shall specify the output device’s default flatness tolerance. 219 | 220 | #### Source 221 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 222 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2829](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2829) 223 | 224 | ### 9: setGState (`gs`) 225 | #### Operands 226 | * `states`: *`array`* - An array of key-value pairs where the first element of the pair is the key and the second element is the value. 227 | Keys may be any of the following: 228 | * `LW` ([setLineWidth](#2-setlinewidth-w)) 229 | * `LC` ([setLineCap](#3-setlinecap-j)) 230 | * `LJ` ([setLineJoin](#4-setlinejoin-j)) 231 | * `ML` ([setMiterLimit](#5-setmiterlimit-m)) 232 | * `D` ([setDash](#6-setdash-d)) 233 | * `RI` ([setRenderingIntent](#7-setrenderingintent-ri)) 234 | * `FL` ([setFlatness](#8-setflatness-i)) 235 | * `Font` ([setFont](#37-setfont-tf)) 236 | * `CA` (stroke alpha) 237 | * `ca` (fill alpha) 238 | * `BM` (global composite operation) 239 | * `SMask`. 240 | 241 | #### PDF Specification 242 | 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. 243 | 244 | #### Source 245 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 246 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2830](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2830) 247 | 248 | ### 10: save (`q`) 249 | #### Operands 250 | *none* 251 | 252 | #### Description 253 | As defined in the PDF specification, the following properties are stored on the graphic stack: 254 | * Stroke 255 | * line width 256 | * line cap style 257 | * line join style 258 | * miter limit 259 | * line dash pattern 260 | 261 | Saves the following properties: 262 | * font 263 | * font size 264 | * font size scale 265 | * font weight (only svg) 266 | * font matrix 267 | * text 268 | * text matrix 269 | * text matrix scale 270 | * text horizontal scale 271 | * text rendering mode 272 | * text rise 273 | * spacing 274 | * character spacing 275 | * word spacing 276 | * color 277 | * fill color 278 | * stroke color 279 | * alpha 280 | * alpha is shape (only canvas) 281 | * fill alpha 282 | * stroke alpha 283 | * line 284 | * line width 285 | * line join (only svg) 286 | * line cap (only svg) 287 | * leading ? 288 | * pattern fill ? 289 | * current point (x, y) (in user coordinates) 290 | * start of text line (x, y) (in text coordinates) 291 | * active s-mask 292 | * resume s-mask context 293 | * dash array (only svg) 294 | * dash phase (only svg) 295 | * dependencies (only svg) 296 | * active clip url (only svg) 297 | * clip group (only svg) 298 | * mask id (only svg) 299 | 300 | #### PDF Specification 301 | Save the current graphics state on the graphics state stack. 302 | 303 | #### Source 304 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 305 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2831](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2831) 306 | 307 | ### 11: restore (`Q`) 308 | #### Operands 309 | *none* 310 | 311 | #### PDF Specification 312 | Restore the graphics state by removing the [most recently saved state](#10-save-q) from the stack and making it the current state. 313 | 314 | #### Source 315 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 316 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2832](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2832) 317 | 318 | ### 12: transform (`cm`) 319 | #### Operands 320 | * `a`: *`number`* - horizontal scaling 321 | * `b`: *`number`* - horizontal skewing 322 | * `c`: *`number`* - vertical skewing 323 | * `d`: *`number`* - vertical scaling 324 | * `e`: *`number`* - horizontal moving 325 | * `f`: *`number`* - vertical moving 326 | 327 | #### PDF Specification 328 | Modify the current transformation matrix (CTM) by concatenating the specified matrix. Although the operands specify a matrix, they shall be written as six separate numbers, not as an array. 329 | 330 | #### Source 331 | * [PDF Specification / Table 57 – Graphics State Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793795) 332 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2833](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2833) 333 | 334 | ### 13: moveTo (`m`) 335 | #### Operands 336 | * `x`: *`number`* 337 | * `y`: *`number`* 338 | 339 | #### PDF Specification 340 | Begin a new subpath by moving the current point to coordinates (`x`, `y`), omitting any connecting line segment. If the previous path construction operator in the current path was also **`m`**, the new **`m`** overrides it; no vestige of the previous **`m`** operation remains in the path. 341 | 342 | #### Source 343 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 344 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2836](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2836) 345 | 346 | ### 14: lineTo (`l`) 347 | #### Operands 348 | * `x`: *`number`* 349 | * `y`: *`number`* 350 | 351 | #### PDF Specification 352 | Append a straight line segment from the current point to the point (`x`, `y`). The new current point shall be (`x`, `y`). 353 | 354 | #### Source 355 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 356 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2837](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2837) 357 | 358 | ### 15: curveTo (`c`) 359 | #### Operands 360 | * `x1`: *`number`* 361 | * `y1`: *`number`* 362 | * `x2`: *`number`* 363 | * `y2`: *`number`* 364 | * `x3`: *`number`* 365 | * `y3`: *`number`* 366 | 367 | #### PDF Specification 368 | Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (`x3`, `y3`), using (`x1`, `y1`) and (`x2`, `y2`) as the Bézier control points. The new current point shall be (`x3`, `y3`). 369 | 370 | #### Source 371 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 372 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2838](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2838) 373 | 374 | ### 16: curveTo2 (`v`) 375 | #### Operands 376 | * `x2`: *`number`* 377 | * `y2`: *`number`* 378 | * `x3`: *`number`* 379 | * `y3`: *`number`* 380 | 381 | #### PDF Specification 382 | Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (`x3`, `y3`), using the current point and (`x2`, `y2`) as the Bézier control points. The new current point shall be (`x3`, `y3`). 383 | 384 | #### Source 385 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 386 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2839](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2839) 387 | 388 | ### 17: curveTo3 (`y`) 389 | #### Operands 390 | * `x1`: *`number`* 391 | * `y1`: *`number`* 392 | * `x3`: *`number`* 393 | * `y3`: *`number`* 394 | 395 | #### PDF Specification 396 | Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point (`x3`, `y3`), using (`x1`, `y1`) and (`x3`, `y3`) as the Bézier control points. The new current point shall be (`x3`, `y3`). 397 | 398 | #### Source 399 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 400 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2840](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2840) 401 | 402 | ### 18: closePath (`h`) 403 | #### Operands 404 | *none* 405 | 406 | #### PDF Specification 407 | Close the current subpath by appending a straight line segment from the current point to the starting point of the 408 | subpath. If the current subpath is already closed, **`h`** shall do nothing. 409 | 410 | This operator terminates the current subpath. Appending another segment to the current path shall begin a new subpath, even if the new segment begins at the endpoint reached by the **`h`** operation. 411 | 412 | #### Source 413 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 414 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2841](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2841) 415 | 416 | ### 19: rectangle (`re`) 417 | #### Operands 418 | * `x`: *`number`* 419 | * `y`: *`number`* 420 | * `width`: *`number`* 421 | * `height`: *`number`* 422 | 423 | #### PDF Specification 424 | Append a rectangle to the current path as a complete subpath, with lower-left corner (`x`, `y`) and dimensions `width` and `height` in user space. The operation 425 | 426 | ``` 427 | x y width height re 428 | ``` 429 | is equivalent to 430 | ``` 431 | x y m 432 | (x + width) y l 433 | (x + width) (y + height) l 434 | x (y + height) l 435 | h 436 | ``` 437 | 438 | #### Source 439 | * [PDF Specification / Table 59 – Path Construction Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987642) 440 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2842](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2842) 441 | 442 | ### 20: stroke (`S`) 443 | #### Operands 444 | *none* 445 | 446 | #### PDF Specification 447 | Stroke the path. 448 | 449 | #### Source 450 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 451 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2843](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2843) 452 | 453 | ### 21: closeStroke (`s`) 454 | #### Operands 455 | *none* 456 | 457 | #### PDF Specification 458 | [Close](#18-closepath-h) and [stroke](#20-stroke-s) the path. This operator shall have the same effect as the sequence `h S`. 459 | 460 | #### Source 461 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 462 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2844](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2844) 463 | 464 | ### 22: fill (`f` / `F`) 465 | #### Operands 466 | *none* 467 | 468 | #### PDF Specification 469 | Fill the path, using the [nonzero winding number rule](http://en.wikipedia.org/wiki/Nonzero-rule) to determine the region to fill. Any subpaths that are open shall be implicitly closed before being filled. 470 | 471 | #### Source 472 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 473 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2845-L2846](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2845-L2846) 474 | 475 | ### 23: eoFill (`f*`) 476 | #### Operands 477 | *none* 478 | 479 | #### PDF Specification 480 | Fill the path, using the [even-odd rule](http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule) to determine the region to fill. 481 | 482 | #### Source 483 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 484 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2847](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2847) 485 | 486 | ### 24: fillStroke (`B`) 487 | #### Operands 488 | *none* 489 | 490 | #### PDF Specification 491 | [Fill](#22-fill-f--f) and then [stroke](#20-stroke-s) the path, using the [nonzero winding number rule](http://en.wikipedia.org/wiki/Nonzero-rule) to determine the region to fill. This operator shall produce the same result as constructing two identical path objects, painting the first with `f` and the second with `S`. 492 | 493 | #### Source 494 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 495 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2848](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2848) 496 | 497 | ### 25: eoFillStroke (`B*`) 498 | #### Operands 499 | *none* 500 | 501 | #### PDF Specification 502 | [Fill](#23-eofill-f) and then [stroke](#20-stroke-s) the path, using the [even-odd rule](http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule) to determine the region to fill. This operator shall produce the same result as `B`, except that the path is filled as if with `f*` instead of `f`. 503 | 504 | #### Source 505 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 506 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2849](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2849) 507 | 508 | ### 26: closeFillStroke (`b`) 509 | #### Operands 510 | *none* 511 | 512 | #### PDF Specification 513 | [Close](#18-closepath-h), [fill](#22-fill-f--f), and then [stroke](#20-stroke-s) the path, using the [nonzero winding number rule](http://en.wikipedia.org/wiki/Nonzero-rule) to determine the region to fill. This operator shall have the same effect as the sequence `h B`. 514 | 515 | #### Source 516 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 517 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2850](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2850) 518 | 519 | ### 27: closeEOFillStroke (`b*`) 520 | #### Operands 521 | *none* 522 | 523 | #### PDF Specification 524 | [Close](#18-closepath-h), [fill](#23-eofill-f), and then [stroke](#20-stroke-s) the path, using the [even-odd rule](http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule) to determine the region to fill. This operator shall have the same effect as the sequence `h B*`. 525 | 526 | #### Source 527 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 528 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2851](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2851) 529 | 530 | ### 28: endPath (`n`) 531 | #### Operands 532 | *none* 533 | 534 | #### PDF Specification 535 | End the path object without filling or stroking it. This operator shall be a path-painting no-op, used primarily for the side effect of changing the current clipping path. 536 | 537 | #### Source 538 | * [PDF Specification / Table 60 – Path-Painting Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987646) 539 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2852](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2852) 540 | 541 | ### 29: clip (`W`) 542 | #### Operands 543 | *none* 544 | 545 | #### PDF Specification 546 | Modify the current clipping path by intersecting it with the current path, using the [nonzero winding number rule](http://en.wikipedia.org/wiki/Nonzero-rule) to determine which regions lie inside the clipping path. 547 | 548 | #### Source 549 | * [PDF Specification / Table 61 – Clipping Path Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1850168) 550 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2855](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2855) 551 | 552 | ### 30: eoClip (`W*`) 553 | #### Operands 554 | *none* 555 | 556 | #### PDF Specification 557 | Modify the current clipping path by intersecting it with the current path, using the [even-odd rule](http://en.wikipedia.org/wiki/Even%E2%80%93odd_rule) to determine which regions lie inside the clipping path. 558 | 559 | #### Source 560 | * [PDF Specification / Table 61 – Clipping Path Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1850168) 561 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2856](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2856) 562 | 563 | ### 31: beginText (`BT`) 564 | #### Operands 565 | *none* 566 | 567 | #### PDF Specification 568 | Begin a text object, initializing the text matrix and the text line matrix to the identity matrix. Text objects shall not be nested; a second **`BT`** shall not appear before an **`ET`** *([`endText`](#32-endtext-et))*. 569 | 570 | #### Source 571 | * [PDF Specification / Table 107 – Text object operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958458) 572 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2859](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2859) 573 | 574 | ### 32: endText (`ET`) 575 | #### Operands 576 | *none* 577 | 578 | #### PDF Specification 579 | End a text object, discarding the text matrix. 580 | 581 | #### Source 582 | * [PDF Specification / Table 107 – Text object operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958458) 583 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2860](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2860) 584 | 585 | ### 33: setCharSpacing (`Tc`) 586 | #### Operands 587 | * `charSpace`: *`number`* 588 | 589 | #### PDF Specification 590 | Set the character spacing to `charSpace`, which shall be a number expressed in unscaled text space units. Character spacing shall be used by the **`Tj`** *([`showText`](#44-showText-tj))*, **`TJ`** *([`showSpacedText`](#45-showspacedtext-tj))*, and **`'`** *([`nextLineShowText`](#46-nextlineshowtext-))* operators. Initial value: `0`. 591 | 592 | #### Source 593 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 594 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2861](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2861) 595 | 596 | ### 34: setWordSpacing (`Tw`) 597 | #### Operands 598 | * `wordSpace`: *`number`* 599 | 600 | #### PDF Specification 601 | Set the word spacing to `wordSpace`, which shall be a number expressed in unscaled text space units. Word spacing shall be used by the **`Tj`** *([`showText`](#44-showText-tj))*, **`TJ`** *([`showSpacedText`](#45-showspacedtext-tj))*, and **`'`** *([`nextLineShowText`](#46-nextlineshowtext-))* operators. Initial value: `0`. 602 | 603 | #### Source 604 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 605 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2862](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2862) 606 | 607 | ### 35: setHScale (`Tz`) 608 | #### Operands 609 | * `scale`: *`number`* 610 | 611 | #### PDF Specification 612 | Set the horizontal scaling to (`scale` ÷ 100). `scale` shall be a number specifying the percentage of the normal width. Initial value: `100` (normal width). 613 | 614 | #### Source 615 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 616 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2863](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2863) 617 | 618 | ### 36: setLeading (`TL`) 619 | #### Operands 620 | * `leading`: *`number`* 621 | 622 | #### PDF Specification 623 | Set the text leading to `leading`, which shall be a number expressed in unscaled text space units. Text leading shall be used only by the **`T*`** *([`nextLine`](#43-nextline-t))*, **`'`** *([`nextLineShowText`](#46-nextlineshowtext-))*, and **`"`** *([`nextLineSetSpacingShowText`](#47-nextlinesetspacingshowtext-))* operators. Initial value: `0`. 624 | 625 | #### Source 626 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 627 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2864](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2864) 628 | 629 | ### 37: setFont (`Tf`) 630 | #### Operands 631 | * `font`: *`string`* 632 | * `size`: *`number`* 633 | 634 | #### PDF Specification 635 | Set the text font to `font` and the text font size to `size`. `font` shall be the name of a font resource in the **Font** subdictionary of the current resource dictionary; `size` shall be a number representing a scale factor. There is no initial value for either `font` or `size`; they shall be specified explicitly by using **`Tf`** before any text is shown. 636 | 637 | #### Source 638 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 639 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2865](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2865) 640 | 641 | ### 38: setTextRenderingMode (`Tr`) 642 | #### Operands 643 | * `render`: ? 644 | 645 | #### PDF Specification 646 | Set the text rendering mode to `render`, which shall be an integer. Initial value: `0`. 647 | 648 | #### Source 649 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 650 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2866](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2866) 651 | 652 | ### 39: setTextRise (`Ts`) 653 | #### Operands 654 | * `rise`: ? 655 | 656 | #### PDF Specification 657 | Set the text rise to `rise`, which shall be a number expressed in unscaled text space units. Initial value: `0`. 658 | 659 | #### Source 660 | * [PDF Specification / Table 105 – Text state operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1958454) 661 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2868](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2868) 662 | 663 | ### 40: moveText (`Td`) 664 | #### Operands 665 | * `tx`: *`number`* 666 | * `ty`: *`number`* 667 | 668 | #### PDF Specification 669 | Move to the start of the next line, offset from the start of the current line by (`tx`, `ty`). `tx` and `ty` shall denote numbers expressed in unscaled text space units. More precisely, this operator shall perform these assignments: 670 | ``` 671 | ⎡ 1 0 0 ⎤ 672 | Tm = Tlm = ⎢ 0 1 0 ⎥ ⨯ Tlm 673 | ⎣ tx ty 1 ⎦ 674 | 675 | Tm = text matrix 676 | Tlm = text line matrix 677 | ``` 678 | 679 | #### Source 680 | * [PDF Specification / Table 108 – Text-positioning operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1849331) 681 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2869](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2869) 682 | 683 | ### 41: setLeadingMoveText (`TD`) 684 | #### Operands 685 | * `tx`: *`number`* 686 | * `ty`: *`number`* 687 | 688 | #### PDF Specification 689 | Move to the start of the next line, offset from the start of the current line by (`tx`, `ty`). As a side effect, this operator shall set the leading parameter in the text state. This operator shall have the same effect as this code: 690 | ``` 691 | −ty TL 692 | tx ty Td 693 | ``` 694 | 695 | #### Source 696 | * [PDF Specification / Table 108 – Text-positioning operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1849331) 697 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2870](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2870) 698 | 699 | ### 42: setTextMatrix (`Tm`) 700 | #### Operands 701 | * `a`: *`number`* - horizontal scaling 702 | * `b`: *`number`* - horizontal skewing 703 | * `c`: *`number`* - vertical skewing 704 | * `d`: *`number`* - vertical scaling 705 | * `e`: *`number`* - horizontal moving 706 | * `f`: *`number`* - vertical moving 707 | 708 | #### PDF Specification 709 | Set the text matrix, **Tm**, and the text line matrix, **Tlm**: 710 | ``` 711 | ⎡ a d 0 ⎤ 712 | Tm = Tlm = ⎢ b e 0 ⎥ 713 | ⎣ c f 1 ⎦ 714 | 715 | Tm = text matrix 716 | Tlm = text line matrix 717 | ``` 718 | The operands shall all be numbers, and the initial value for **Tm** and **Tlm** shall be the identity matrix, `[ 1 0 0 1 0 0 ]`. Although the operands specify a matrix, they shall be passed to **Tm** as six separate numbers, not as an array. 719 | 720 | The matrix specified by the operands shall not be concatenated onto the current text matrix, but shall replace it. 721 | 722 | #### Source 723 | * [PDF Specification / Table 108 – Text-positioning operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1849331) 724 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2871](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2871) 725 | 726 | ### 43: nextLine (`T*`) 727 | #### Operands 728 | *none* 729 | 730 | #### PDF Specification 731 | Move to the start of the next line. This operator has the same effect as the code 732 | ``` 733 | 0 -Tl Td 734 | ``` 735 | where `Tl` denotes the current leading parameter in the text state. The negative of `Tl` is used here because `Tl` is the text leading expressed as a positive number. Going to the next line entails decreasing the y coordinate. 736 | 737 | #### Source 738 | * [PDF Specification / Table 108 – Text-positioning operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1849331) 739 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2872](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2872) 740 | 741 | ### 44: showText (`Tj`) 742 | #### Operands 743 | Operands differ between the PDF specification and the implementation in PDF.js. 744 | * `string`: *`string`* (PDF Specification) 745 | * `glyphs`: *`array`* (implementation in PDF.js) 746 | 747 | #### PDF Specification 748 | Show a text string. 749 | 750 | #### Source 751 | * [PDF Specification / Table 109 – Text-showing operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1898300) 752 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2873](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2873) 753 | 754 | ### 45: showSpacedText (`TJ`) 755 | #### Operands 756 | * `array`: ? 757 | 758 | #### PDF Specification 759 | Show one or more text strings, allowing individual glyph positioning. Each element of `array` shall be either a string or a number. If the element is a string, this operator shall show the string. If it is a number, the operator shall adjust the text position by that amount; that is, it shall translate the text matrix, **Tm**. The number shall be expressed in thousandths of a unit of text space. This amount shall be subtracted from the current horizontal or vertical coordinate, depending on the writing mode. In the default coordinate system, a positive adjustment has the effect of moving the next glyph painted either to the left or down by the given amount. 760 | 761 | #### Source 762 | * [PDF Specification / Table 109 – Text-showing operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1898300) 763 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2874](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2874) 764 | 765 | ### 46: nextLineShowText (`'`) 766 | #### Operands 767 | Operands differ between the PDF specification and the implementation in PDF.js. 768 | * `string`: *`string`* (PDF Specification) 769 | * `glyphs`: *`array`* (implementation in PDF.js) 770 | 771 | #### PDF Specification 772 | Move to the next line and show a text string. This operator shall have the same effect as the code 773 | ``` 774 | T* 775 | string Tj 776 | ``` 777 | 778 | #### Source 779 | * [PDF Specification / Table 109 – Text-showing operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1898300) 780 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2875](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2875) 781 | 782 | ### 47: nextLineSetSpacingShowText (`"`) 783 | #### Operands 784 | Operands differ between the PDF specification and the implementation in PDF.js. 785 | * `aw`: *`number`* (same) 786 | * `ac`: *`number`* (same) 787 | * `string`: *`string`* (PDF Specification) 788 | * `glyphs`: *`array`* (implementation in PDF.js) 789 | 790 | #### PDF Specification 791 | Move to the next line and show a text string, using `aw` as the word spacing and `ac` as the character spacing (setting the corresponding parameters in the text state). `aw` and `ac` shall be numbers expressed in unscaled text space units. This operator shall have the same effect as this code: 792 | ``` 793 | aw Tw 794 | ac Tc 795 | string ' 796 | ``` 797 | 798 | #### Source 799 | * [PDF Specification / Table 109 – Text-showing operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1898300) 800 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2876-L2877](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2876-L2877) 801 | 802 | ### 48: setCharWidth (`d0`) 803 | #### Operands 804 | * `wx`: *`number`* 805 | * `wy`: *`number`* 806 | 807 | #### PDF Specification 808 | Set width information for the glyph and declare that the glyph description specifies both its shape and its colour. 809 | 810 | `wx` denotes the horizontal displacement in the glyph coordinate system; it shall be consistent with the corresponding width in the font’s **Widths** array. `wy` shall be `0`. 811 | 812 | This operator shall only be permitted in a content stream appearing in a Type 3 font’s **CharProcs** dictionary. It is typically used only if the glyph description executes operators to set the colour explicitly. 813 | 814 | #### Source 815 | * [PDF Specification / Table 113 – Type 3 font operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1853938) 816 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2880](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2880) 817 | 818 | ### 49: setCharWidthAndBounds (`d1`) 819 | #### Operands 820 | * `wx`: *`number`* 821 | * `wy`: *`number`* 822 | * `llx`: ? 823 | * `lly`: ? 824 | * `urx`: ? 825 | * `ury`: ? 826 | 827 | #### PDF Specification 828 | Set width and bounding box information for the glyph and declare that the glyph description specifies only shape, not colour. 829 | 830 | `wx` denotes the horizontal displacement in the glyph coordinate system; it shall be consistent with the corresponding width in the font’s **Widths** array. `wy` shall be `0`. 831 | 832 | `llx` and `lly` denote the coordinates of the lower-left corner, and `urx` and `ury` denote the upper-right corner, of the glyph bounding box. 833 | 834 | The glyph bounding box is the smallest rectangle, oriented with the axes of the glyph coordinate system, that completely encloses all marks placed on the page as a result of executing the glyph’s description. The declared bounding box shall be correct—in other words, sufficiently large to enclose the entire glyph. If any marks fall outside this bounding box, the result is unpredictable. 835 | 836 | A glyph description that begins with the **`d1`** operator should not execute any operators that set the colour (or other colour-related parameters) in the graphics state; any use of such operators shall be ignored. The glyph description is executed solely to determine the glyph’s shape. Its colour shall be determined by the graphics state in effect each time this glyph is painted by a text-showing operator. For the same reason, the glyph description shall not include an image; however, an image mask is acceptable, since it merely defines a region of the page to be painted with the current colour. 837 | 838 | This operator shall be used only in a content stream appearing in a Type 3 font’s **CharProcs** dictionary. 839 | 840 | #### Source 841 | * [PDF Specification / Table 113 – Type 3 font operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G8.1853938) 842 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2881](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2881) 843 | 844 | ### 50: setStrokeColorSpace (`CS`) 845 | #### Operands 846 | * `name`: *`string`* 847 | 848 | #### PDF Specification 849 | Set the current colour space to use for stroking operations. The operand `name` shall be a name object. If the colour space is one that can be specified by a name and no additional parameters (**DeviceGray**, **DeviceRGB**, **DeviceCMYK**, and certain cases of **Pattern**), the name may be specified directly. Otherwise, it shall be a name defined in the **ColorSpace** subdictionary of the current resource dictionary; the associated value shall be an array describing the colour space. 850 | 851 | The names ***DeviceGray***, ***DeviceRGB***, ***DeviceCMYK***, and ***Pattern*** always identify the corresponding colour spaces directly; they never refer to resources in the ***ColorSpace*** subdictionary. 852 | 853 | The **`CS`** operator shall also set the current stroking colour to its initial value, which depends on the colour space: 854 | * In a **DeviceGray**, **DeviceRGB**, **CalGray**, or **CalRGB** colour space, the initial colour shall have all components equal to `0.0`. 855 | * In a **DeviceCMYK** colour space, the initial colour shall be `[ 0.0 0.0 0.0 1.0 ]`. 856 | * In a **Lab** or **ICCBased** colour space, the initial colour shall have all components equal to `0.0` unless that falls outside the intervals specified by the space’s **Range** entry, in which case the nearest valid value shall be 857 | substituted. 858 | * In an **Indexed** colour space, the initial colour value shall be `0`. 859 | * In a **Separation** or **DeviceN** colour space, the initial tint value shall be `1.0` for all colorants. 860 | * In a **Pattern** colour space, the initial colour shall be a pattern object that causes nothing to be painted. 861 | 862 | #### Source 863 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 864 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2885](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2885) 865 | 866 | ### 51: setFillColorSpace (`cs`) 867 | #### Operands 868 | * `name`: *`string`* 869 | 870 | #### PDF Specification 871 | Same as **`CS`** *([`setStrokeColorSpace`](#50-setstrokecolorspace-cs))* but used for nonstroking operations. 872 | 873 | #### Source 874 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 875 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2886](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2886) 876 | 877 | ### 52: setStrokeColor (`SC`) 878 | #### Operands 879 | For gray color spaces (DeviceGray, CalGray or Indexed): 880 | * `level`: *`number`* 881 | 882 | For RGB color spaces (DeviceRGB, CalRGB or Lab): 883 | * `r`: *`number`* 884 | * `g`: *`number`* 885 | * `b`: *`number`* 886 | 887 | For CMYK color spaces (DeviceCMYK): 888 | * `c`: *`number`* 889 | * `m`: *`number`* 890 | * `y`: *`number`* 891 | * `k`: *`number`* 892 | 893 | #### PDF Specification 894 | Set the colour to use for stroking operations in a device, CIE-based (other than **ICCBased**), or **Indexed** colour space. The number of operands required and their interpretation depends on the current stroking colour space: 895 | * For **DeviceGray**, **CalGray**, and **Indexed** colour spaces, one operand shall be required (`n` = `1`). 896 | * For **DeviceRGB**, **CalRGB**, and **Lab** colour spaces, three operands shall be required (`n` = `3`). 897 | * For **DeviceCMYK** four operands shall be required (`n` = `4`). 898 | 899 | #### Source 900 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 901 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2887](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2887) 902 | 903 | ### 53: setStrokeColorN (`SCN`) 904 | #### Operands 905 | * `c1` ... `cn` (`n` ≤ 32) 906 | or 907 | * `c1` ... `cn` (`n` ≤ 32) 908 | * `name` 909 | 910 | #### PDF Specification 911 | Same as **`SC`** *([`setStrokeColor`](#52-setstrokecolor-sc))* but also supports **Pattern**, **Separation**, **DeviceN** and **ICCBased** colour spaces. 912 | 913 | If the current stroking colour space is a **Separation**, **DeviceN**, or **ICCBased** colour space, the operands `c1` ... `cn` shall be numbers. The number of operands and their interpretation depends on the colour space. 914 | 915 | If the current stroking colour space is a **Pattern** colour space, `name` shall be the name of an entry in the **Pattern** subdictionary of the current resource dictionary. For an uncoloured tiling pattern (**PatternType** = `1` and **PaintType** = `2`), `c1` ... `cn` shall be component values specifying a colour in the pattern’s underlying colour space. For other types of patterns, these operands shall not be specified. 916 | 917 | #### Source 918 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 919 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2888](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2888) 920 | 921 | ### 54: setFillColor (`sc`) 922 | #### Operands 923 | For gray color spaces (DeviceGray, CalGray or Indexed): 924 | * `level`: *`number`* 925 | 926 | For RGB color spaces (DeviceRGB, CalRGB or Lab): 927 | * `r`: *`number`* 928 | * `g`: *`number`* 929 | * `b`: *`number`* 930 | 931 | For CMYK color spaces (DeviceCMYK): 932 | * `c`: *`number`* 933 | * `m`: *`number`* 934 | * `y`: *`number`* 935 | * `k`: *`number`* 936 | 937 | #### PDF Specification 938 | Same as **`SC`** *([`setStrokeColor`](#52-setstrokecolor-sc))* but used for nonstroking operations. 939 | 940 | #### Source 941 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 942 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2889](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2889) 943 | 944 | ### 55: setFillColorN (`scn`) 945 | #### Operands 946 | * `c1` ... `cn` (`n` ≤ 32) 947 | or 948 | * `c1` ... `cn` (`n` ≤ 32) 949 | * `name` 950 | 951 | #### PDF Specification 952 | Same as **`SCN`** *([`setStrokeColorN`](#53-setstrokecolorn-scn))* but used for nonstroking operations. 953 | 954 | #### Source 955 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 956 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2890](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2890) 957 | 958 | ### 56: setStrokeGray (`G`) 959 | #### Operands 960 | * `gray`: *`number`* - value between `0.0` (black) and `1.0` (white) 961 | 962 | #### PDF Specification 963 | Set the stroking colour space to **DeviceGray** (or the **DefaultGray** colour space) and set the gray level to use for stroking operations. `gray` shall be a number between `0.0` (black) and `1.0` (white). 964 | 965 | #### Source 966 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 967 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2891](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2891) 968 | 969 | ### 57: setFillGray (`g`) 970 | #### Operands 971 | * `gray`: *`number`* - value between `0.0` (black) and `1.0` (white). 972 | 973 | #### PDF Specification 974 | Same as **`G`** *([`setStrokeGray`](#56-setstrokegray-g))* but used for nonstroking operations. 975 | 976 | #### Source 977 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 978 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2892](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2892) 979 | 980 | ### 58: setStrokeRGBColor (`RG`) 981 | #### Operands 982 | * `r`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 983 | * `g`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 984 | * `b`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 985 | 986 | #### PDF Specification 987 | Set the stroking colour space to **DeviceRGB** (or the **DefaultRGB** colour space) and set the colour to use for stroking operations. Each operand shall be a number between `0.0` (minimum intensity) and `1.0` (maximum intensity). 988 | 989 | #### Source 990 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 991 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2893](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2893) 992 | 993 | ### 59: setFillRGBColor (`rg`) 994 | #### Operands 995 | * `r`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 996 | * `g`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 997 | * `b`: *`number`* - value between `0.0` (minimum intensity) and `1.0` (maximum intensity) 998 | 999 | #### PDF Specification 1000 | Same as **`RG`** *([`setStrokeRGBColor`](#58-setstrokecolor-rg))* but used for nonstroking operations. 1001 | 1002 | #### Source 1003 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 1004 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2894](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2894) 1005 | 1006 | ### 60: setStrokeCMYKColor (`K`) 1007 | #### Operands 1008 | * `c`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1009 | * `m`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1010 | * `y`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1011 | * `k`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1012 | 1013 | #### PDF Specification 1014 | Set the stroking colour space to **DeviceCMYK** (or the **DefaultCMYK** colour space) and set the colour to use for stroking operations. Each operand shall be a number between `0.0` (zero concentration) and `1.0` (maximum concentration). The behaviour of this operator is affected by the overprint mode. 1015 | 1016 | #### Source 1017 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 1018 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2895](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2895) 1019 | 1020 | ### 61: setFillCMYKColor (`k`) 1021 | #### Operands 1022 | * `c`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1023 | * `m`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1024 | * `y`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1025 | * `k`: *`number`* - value between `0.0` (zero concentration) and `1.0` (maximum concentration) 1026 | 1027 | #### PDF Specification 1028 | Same as **`K`** *([`setStrokeCMYKColor`](#60-setstrokecmykcolor-k))* but used for nonstroking operations. 1029 | 1030 | #### Source 1031 | * [PDF Specification / Table 74 – Colour Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3793574) 1032 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2896](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2896) 1033 | 1034 | ### 62: shadingFill (`sh`) 1035 | #### Operands 1036 | * `name`: *`string`* 1037 | 1038 | #### PDF Specification 1039 | Paint the shape and colour shading described by a shading dictionary, subject to the current clipping path. The current colour in the graphics state is neither used nor altered. The effect is different from that of painting a path using a shading pattern as the current colour. 1040 | 1041 | `name` is the name of a shading dictionary resource in the **Shading** subdictionary of the current resource dictionary. All coordinates in the shading dictionary are interpreted relative to the current user space. (By 1042 | contrast, when a shading dictionary is used in a type 2 pattern, the coordinates are expressed in pattern space.) All colours are interpreted in the colour space identified by the shading dictionary’s **ColorSpace** entry. The **Background** entry, if present, is ignored. 1043 | 1044 | This operator should be applied only to bounded or geometrically defined shadings. If applied to an unbounded shading, it paints the shading’s gradient fill across the entire clipping region, which may be time-consuming. 1045 | 1046 | #### Source 1047 | * [PDF Specification / Table 77 – Shading Operator](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1851121) 1048 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2899](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2899) 1049 | 1050 | ### 63: beginInlineImage (`BI`) 1051 | #### Operands 1052 | *none* 1053 | 1054 | #### PDF Specification 1055 | Begin an inline image object. 1056 | 1057 | #### Source 1058 | * [PDF Specification / Table 92 – Inline Image Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1852045) 1059 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2902](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2902) 1060 | 1061 | ### 64: beginImageData (`ID`) 1062 | #### Operands 1063 | *none* 1064 | 1065 | #### PDF Specification 1066 | Begin the image data for an inline image object. 1067 | 1068 | #### Source 1069 | * [PDF Specification / Table 92 – Inline Image Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1852045) 1070 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2903](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2903) 1071 | 1072 | ### 65: endInlineImage (`EI`) 1073 | #### Operands 1074 | *none* 1075 | 1076 | #### PDF Specification 1077 | End an inline image object. 1078 | 1079 | #### Source 1080 | * [PDF Specification / Table 92 – Inline Image Operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.1852045) 1081 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2904](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2904) 1082 | 1083 | ### 66: paintXObject (`Do`) 1084 | #### Operands 1085 | * `name`: ? 1086 | 1087 | #### PDF Specification 1088 | Paint the specified XObject. The operand `name` shall appear as a key in the **XObject** subdictionary of the current resource dictionary. The associated value shall be a stream whose **Type** entry, if present, is **XObject**. The effect of **`Do`** depends on the value of the XObject’s Subtype entry, which may be **Image**, **Form**, or **PS** (PostScript XObject). 1089 | 1090 | #### Source 1091 | * [PDF Specification / Table 87 – XObject Operator](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G7.3987702) 1092 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2907](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2907) 1093 | 1094 | ### 67: markPoint (`MP`) 1095 | #### Operands 1096 | * `tag`: ? 1097 | 1098 | #### PDF Specification 1099 | Designate a marked-content point. `tag` shall be a name object indicating the role or significance of the point. 1100 | 1101 | #### Source 1102 | * [PDF Specification / Table 320 – Marked-content operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G13.2438921) 1103 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2908](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2908) 1104 | 1105 | ### 68: markPointProps (`DP`) 1106 | #### Operands 1107 | * `tag`: ? 1108 | * `properties`: ? 1109 | 1110 | #### PDF Specification 1111 | Designate a marked-content point with an associated property list. `tag` shall be a name object indicating the role or significance of the point. `properties` shall be either an inline dictionary containing the property list or a name object associated with it in the **Properties** subdictionary of the current resource dictionary. 1112 | 1113 | #### Source 1114 | * [PDF Specification / Table 320 – Marked-content operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G13.2438921) 1115 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2909](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2909) 1116 | 1117 | ### 69: beginMarkedContent (`BMC`) 1118 | #### Operands 1119 | * `tag`: ? 1120 | 1121 | #### PDF Specification 1122 | Begin a marked-content sequence terminated by a balancing **`EMC`** *([`endMarkedContent`](#71-endmarkedcontent-emc))* operator. `tag` shall be a name object indicating the role or significance of the sequence. 1123 | 1124 | #### Source 1125 | * [PDF Specification / Table 320 – Marked-content operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G13.2438921) 1126 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2910](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2910) 1127 | 1128 | ### 70: beginMarkedContentProps (`BDC`) 1129 | #### Operands 1130 | * `tag`: ? 1131 | * `properties`: ? 1132 | 1133 | #### PDF Specification 1134 | Begin a marked-content sequence with an associated property list, terminated by a balancing **`EMC`** *([`endMarkedContent`](#71-endmarkedcontent-emc))* operator. `tag` shall be a name object indicating the role or significance of the sequence. `properties` shall be either an inline dictionary containing the property list or a name object associated with it in the **Properties** subdictionary of the current resource dictionary. 1135 | 1136 | #### Source 1137 | * [PDF Specification / Table 320 – Marked-content operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G13.2438921) 1138 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2911-L2912](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2911-L2912) 1139 | 1140 | ### 71: endMarkedContent (`EMC`) 1141 | #### Operands 1142 | *none* 1143 | 1144 | #### PDF Specification 1145 | End a marked-content sequence begun by a **`BMC`** *([`beginMarkedContent`](#69-beginmarkedcontent-bmc))* or **`BDC`** *([`beginMarkedContentProps`](#70-beginmarkedcontentprops-bdc))* operator. 1146 | 1147 | #### Source 1148 | * [PDF Specification / Table 320 – Marked-content operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G13.2438921) 1149 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2913](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2913) 1150 | 1151 | ### 72: beginCompat (`BX`) 1152 | #### Operands 1153 | *none* 1154 | 1155 | #### PDF Specification 1156 | Begin a compatibility section. Unrecognized operators (along with their operands) shall be ignored without error until the balancing **`EX`** *([`endCompat`](#73-endcompat-ex))* operator is encountered. 1157 | 1158 | #### Source 1159 | * [PDF Specification / Table 32 – Compatibility operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G6.1913072) 1160 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2916](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2916) 1161 | 1162 | ### 73: endCompat (`EX`) 1163 | #### Operands 1164 | *none* 1165 | 1166 | #### PDF Specification 1167 | End a compatibility section begun by a balancing **`BX`** *([`beginCompat`](#72-begincompat-bx))* operator. Ignore any unrecognized operands and operators from previous matching **`BX`** onward. 1168 | 1169 | #### Source 1170 | * [PDF Specification / Table 32 – Compatibility operators](https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#G6.1913072) 1171 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L2917](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L2917) 1172 | 1173 | ### 74: paintFormXObjectBegin 1174 | #### Operands 1175 | * `matrix`: ? 1176 | * `bbox`: ? 1177 | 1178 | #### Source 1179 | [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L331](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L331) 1180 | 1181 | ### 75: paintFormXObjectEnd 1182 | #### Operands 1183 | *none* 1184 | 1185 | #### Source 1186 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L340](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L340) 1187 | 1188 | ### 76: beginGroup 1189 | #### Operands 1190 | * `groupOptions`: `object` 1191 | * `matrix`: ? 1192 | * `bbox`: ? 1193 | * `smask`: ? 1194 | * `isolated`: `boolean` (default value: `false`) 1195 | * `knockout`: `boolean` (default value: `false`) 1196 | 1197 | #### Source 1198 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L328](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L328) 1199 | 1200 | ### 77: endGroup 1201 | #### Operands 1202 | * `groupOptions`: *`object`* 1203 | * `matrix`: ? 1204 | * `bbox`: ? 1205 | * `smask`: ? 1206 | * `isolated`: *`boolean`* (default value: `false`) 1207 | * `knockout`: *`boolean`* (default value: `false`) 1208 | 1209 | #### Source 1210 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L343](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L343) 1211 | 1212 | ### 78: beginAnnotations 1213 | #### Operands 1214 | *none* 1215 | 1216 | #### Source 1217 | * * [https://github.com/mozilla/pdf.js/.../src/core/document.js#L247](https://github.com/mozilla/pdf.js/blob/88e87ce240676d4be4ab52f6d9ed567a1827d5fa/src/core/document.js#L247) 1218 | 1219 | ### 79: endAnnotations 1220 | #### Operands 1221 | *none* 1222 | 1223 | #### Source 1224 | * [https://github.com/mozilla/pdf.js/.../src/core/document.js#L251](https://github.com/mozilla/pdf.js/blob/88e87ce240676d4be4ab52f6d9ed567a1827d5fa/src/core/document.js#L251) 1225 | 1226 | ### 80: beginAnnotation 1227 | #### Operands 1228 | * `rect`: ? 1229 | * `transform`: ? 1230 | * `matrix`: ? 1231 | 1232 | #### Source 1233 | * [https://github.com/mozilla/pdf.js/.../src/core/annotation.js#L450](https://github.com/mozilla/pdf.js/blob/ff2df9c5b64a700e06694ff3375cd54c10ccedf4/src/core/annotation.js#L450) 1234 | 1235 | ### 81: endAnnotation 1236 | #### Operands 1237 | *none* 1238 | 1239 | #### Source 1240 | * [https://github.com/mozilla/pdf.js/.../src/core/annotation.js#L457](https://github.com/mozilla/pdf.js/blob/ff2df9c5b64a700e06694ff3375cd54c10ccedf4/src/core/annotation.js#L457) 1241 | 1242 | ### 82: paintJpegXObject 1243 | * `objId`: ? 1244 | * `w`: *`number`* 1245 | * `h`: *`number`* 1246 | 1247 | #### Source 1248 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L441](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L441) 1249 | 1250 | ### 83: paintImageMaskXObject 1251 | #### Operands 1252 | * `imgData`: ? 1253 | 1254 | #### Source 1255 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L390](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L390) 1256 | 1257 | ### 84: paintImageMaskXObjectGroup 1258 | #### Operands 1259 | * `images`: ? 1260 | 1261 | #### Source 1262 | * [https://github.com/mozilla/pdf.js/.../src/core/operator_list.js#L251](https://github.com/mozilla/pdf.js/blob/160ca551633cd7901ee68ae6ef748ec7d6ec0aed/src/core/operator_list.js#L251) 1263 | 1264 | ### 85: paintImageXObject 1265 | #### Operands 1266 | * `objId`: ? 1267 | * `w`: *`number`* 1268 | * `h`: *`number`* 1269 | 1270 | #### Source 1271 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L499](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L499) 1272 | 1273 | ### 86: paintInlineImageXObject 1274 | #### Operands 1275 | * `imgData`: ? 1276 | 1277 | #### Source 1278 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L417](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L417) 1279 | 1280 | ### 87: paintInlineImageXObjectGroup 1281 | * `imgData`: ? 1282 | * `map`: ? 1283 | 1284 | #### Source 1285 | * [https://github.com/mozilla/pdf.js/.../src/core/operator_list.js#L148](https://github.com/mozilla/pdf.js/blob/160ca551633cd7901ee68ae6ef748ec7d6ec0aed/src/core/operator_list.js#L148) 1286 | 1287 | ### 88: paintImageXObjectRepeat 1288 | * `objId`: ? 1289 | * `scaleX`: *`number`* 1290 | * `scaleY`: *`number`* 1291 | * `positions`: ? 1292 | 1293 | #### Source 1294 | * [https://github.com/mozilla/pdf.js/.../src/core/operator_list.js#L337](https://github.com/mozilla/pdf.js/blob/160ca551633cd7901ee68ae6ef748ec7d6ec0aed/src/core/operator_list.js#L337) 1295 | 1296 | ### 89: paintImageMaskXObjectRepeat 1297 | * `imgData`: ? 1298 | * `scaleX`: *`number`* 1299 | * `scaleY`: *`number`* 1300 | * `positions`: ? 1301 | 1302 | #### Source 1303 | * [https://github.com/mozilla/pdf.js/.../src/core/operator_list.js#L236](https://github.com/mozilla/pdf.js/blob/160ca551633cd7901ee68ae6ef748ec7d6ec0aed/src/core/operator_list.js#L236) 1304 | 1305 | ### 90: paintSolidColorImageMask 1306 | #### Operands 1307 | *none* 1308 | 1309 | #### Source 1310 | * [https://github.com/mozilla/pdf.js/.../src/core/operator_list.js#L45](https://github.com/mozilla/pdf.js/blob/160ca551633cd7901ee68ae6ef748ec7d6ec0aed/src/core/operator_list.js#L45) 1311 | 1312 | ### 91: constructPath 1313 | #### Operands 1314 | * `ops`: *`array`* - a list of operation indexes (can be any of [`moveTo`](#13-moveto-m) (`13`), [`lineTo`](#14-lineto-l) (`14`), [`curveTo`](#15-curveto-c) (`15`), [`curveTo2`](#16-curveto2-v) (`16`), [`curveTo3`](#17-curveto3-y) (`17`, [`closePath`](18-closepath-h) (`18`), or [`rectangle`](#19-rectangle-re) (`19`)) 1315 | * `args`: *`array`* - a list of associated arguments for the operations defined in `ops` 1316 | 1317 | #### Description 1318 | Represents a collection of path construction operations. Is there because of speed optimization so paths can be drawn in a batch. 1319 | 1320 | #### Example 1321 | ``` 1322 | { 1323 | "ops": [ 19, 13, 14 ], 1324 | "args": [ 0, 0, 5, 6, 6, 0, 4, 3 ], 1325 | } 1326 | ``` 1327 | This would draw a rectangle (`19`) from the point (`0`, `0`) with a width of `5` and a height of `6`, than move the cursor (`13`) to the point (`6`, `0`) and afterwards draw a line (`14`) from this point to the point (`4`, `3`): 1328 | * `rectangle`: [ `0`, `0`, `5`, `6` ] 1329 | * `moveTo`: [ `6`, `0` ] 1330 | * `lineTo`: [ `4`, `3` ] 1331 | 1332 | #### Source 1333 | * [https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L881](https://github.com/mozilla/pdf.js/blob/842e9206c059d36b9592e1e1b214985da6b57170/src/core/evaluator.js#L881) 1334 | --------------------------------------------------------------------------------