Skip to content

Latest commit

 

History

History
1333 lines (1033 loc) · 64.8 KB

README.md

File metadata and controls

1333 lines (1033 loc) · 64.8 KB

Documentation of the core of Mozilla's PDF.js library

Operations

Preliminary mark

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.

Overview

Graphic objects

(Copyright Adobe Systems Incorporated / Extracted from the PDF Specification: Figure 9 - Graphic objects)

General graphics state

Special graphics state

Path construction

Path painting

Clipping paths

Text objects

Text state

Text positioning

Text showing

Type 3 fonts

Color

Shading patterns

Inline images

XObjects

Marked content

Compatibility

PDF.js only

1: dependency

  • dependencies: array - list of dependency object ids

2: setLineWidth (w)

Operands

  • lineWidth: number

PDF Specification

Set the line width in the graphics state.

Source

3: setLineCap (J)

Operands

  • lineCap: number - either 0 (butt), 1 (round), or 2 (square)

PDF Specification

Set the line cap style in the graphics state.

Source

4: setLineJoin (j)

Operands

  • lineJoin: number - either 0 (miter), 1 (round), or 2 (bevel)

PDF Specification

Set the line join style in the graphics state.

Source

5: setMiterLimit (M)

Operands

  • miterLimit: number

PDF Specification

Set the miter limit in the graphics state.

Source

6: setDash (d)

Operands

PDF Specification

Set the line dash pattern in the graphics state.

Source

7: setRenderingIntent (ri)

Operands

  • intent: ?

PDF Specification

Set the colour rendering intent in the graphics state.

Source

8: setFlatness (i)

Operands

  • flatness: number

PDF Specification

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.

Source

9: setGState (gs)

Operands

PDF Specification

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.

Source

10: save (q)

Operands

none

Description

As defined in the PDF specification, the following properties are stored on the graphic stack:

  • Stroke
    • line width
    • line cap style
    • line join style
    • miter limit
    • line dash pattern

Saves the following properties:

  • font
    • font size
    • font size scale
    • font weight (only svg)
    • font matrix
  • text
    • text matrix
    • text matrix scale
    • text horizontal scale
    • text rendering mode
    • text rise
  • spacing
    • character spacing
    • word spacing
  • color
    • fill color
    • stroke color
  • alpha
    • alpha is shape (only canvas)
    • fill alpha
    • stroke alpha
  • line
    • line width
    • line join (only svg)
    • line cap (only svg)
  • leading ?
  • pattern fill ?
  • current point (x, y) (in user coordinates)
  • start of text line (x, y) (in text coordinates)
  • active s-mask
  • resume s-mask context
  • dash array (only svg)
  • dash phase (only svg)
  • dependencies (only svg)
  • active clip url (only svg)
  • clip group (only svg)
  • mask id (only svg)

PDF Specification

Save the current graphics state on the graphics state stack.

Source

11: restore (Q)

Operands

none

PDF Specification

Restore the graphics state by removing the most recently saved state from the stack and making it the current state.

Source

12: transform (cm)

Operands

  • a: number - horizontal scaling
  • b: number - horizontal skewing
  • c: number - vertical skewing
  • d: number - vertical scaling
  • e: number - horizontal moving
  • f: number - vertical moving

PDF Specification

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.

Source

13: moveTo (m)

Operands

  • x: number
  • y: number

PDF Specification

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.

Source

14: lineTo (l)

Operands

  • x: number
  • y: number

PDF Specification

Append a straight line segment from the current point to the point (x, y). The new current point shall be (x, y).

Source

15: curveTo (c)

Operands

  • x1: number
  • y1: number
  • x2: number
  • y2: number
  • x3: number
  • y3: number

PDF Specification

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).

Source

16: curveTo2 (v)

Operands

  • x2: number
  • y2: number
  • x3: number
  • y3: number

PDF Specification

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).

Source

17: curveTo3 (y)

Operands

  • x1: number
  • y1: number
  • x3: number
  • y3: number

PDF Specification

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).

Source

18: closePath (h)

Operands

none

PDF Specification

Close the current subpath by appending a straight line segment from the current point to the starting point of the
subpath. If the current subpath is already closed, h shall do nothing.

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.

Source

19: rectangle (re)

Operands

  • x: number
  • y: number
  • width: number
  • height: number

PDF Specification

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

x y width height re

is equivalent to

x y m
(x + width) y l
(x + width) (y + height) l
x (y + height) l
h

Source

20: stroke (S)

Operands

none

PDF Specification

Stroke the path.

Source

21: closeStroke (s)

Operands

none

PDF Specification

Close and stroke the path. This operator shall have the same effect as the sequence h S.

Source

22: fill (f / F)

Operands

none

PDF Specification

Fill the path, using the nonzero winding number rule to determine the region to fill. Any subpaths that are open shall be implicitly closed before being filled.

Source

23: eoFill (f*)

Operands

none

PDF Specification

Fill the path, using the even-odd rule to determine the region to fill.

Source

24: fillStroke (B)

Operands

none

PDF Specification

Fill and then stroke the path, using the nonzero winding number 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.

Source

25: eoFillStroke (B*)

Operands

none

PDF Specification

Fill and then stroke the path, using the even-odd 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.

Source

26: closeFillStroke (b)

Operands

none

PDF Specification

Close, fill, and then stroke the path, using the nonzero winding number rule to determine the region to fill. This operator shall have the same effect as the sequence h B.

Source

27: closeEOFillStroke (b*)

Operands

none

PDF Specification

Close, fill, and then stroke the path, using the even-odd rule to determine the region to fill. This operator shall have the same effect as the sequence h B*.

Source

28: endPath (n)

Operands

none

PDF Specification

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.

Source

29: clip (W)

Operands

none

PDF Specification

Modify the current clipping path by intersecting it with the current path, using the nonzero winding number rule to determine which regions lie inside the clipping path.

Source

30: eoClip (W*)

Operands

none

PDF Specification

Modify the current clipping path by intersecting it with the current path, using the even-odd rule to determine which regions lie inside the clipping path.

Source

31: beginText (BT)

Operands

none

PDF Specification

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).

Source

32: endText (ET)

Operands

none

PDF Specification

End a text object, discarding the text matrix.

Source

33: setCharSpacing (Tc)

Operands

  • charSpace: number

PDF Specification

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), TJ (showSpacedText), and ' (nextLineShowText) operators. Initial value: 0.

Source

34: setWordSpacing (Tw)

Operands

  • wordSpace: number

PDF Specification

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), TJ (showSpacedText), and ' (nextLineShowText) operators. Initial value: 0.

Source

35: setHScale (Tz)

Operands

  • scale: number

PDF Specification

Set the horizontal scaling to (scale ÷ 100). scale shall be a number specifying the percentage of the normal width. Initial value: 100 (normal width).

Source

36: setLeading (TL)

Operands

  • leading: number

PDF Specification

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), ' (nextLineShowText), and " (nextLineSetSpacingShowText) operators. Initial value: 0.

Source

37: setFont (Tf)

Operands

  • font: string
  • size: number

PDF Specification

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.

Source

38: setTextRenderingMode (Tr)

Operands

  • render: ?

PDF Specification

Set the text rendering mode to render, which shall be an integer. Initial value: 0.

Source

39: setTextRise (Ts)

Operands

  • rise: ?

PDF Specification

Set the text rise to rise, which shall be a number expressed in unscaled text space units. Initial value: 0.

Source

40: moveText (Td)

Operands

  • tx: number
  • ty: number

PDF Specification

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:

           ⎡ 1  0  0 ⎤
Tm = Tlm = ⎢ 0  1  0 ⎥ ⨯ Tlm
           ⎣ tx ty 1 ⎦

Tm  = text matrix
Tlm = text line matrix

Source

41: setLeadingMoveText (TD)

Operands

  • tx: number
  • ty: number

PDF Specification

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:

−ty TL
tx ty Td

Source

42: setTextMatrix (Tm)

Operands

  • a: number - horizontal scaling
  • b: number - horizontal skewing
  • c: number - vertical skewing
  • d: number - vertical scaling
  • e: number - horizontal moving
  • f: number - vertical moving

PDF Specification

Set the text matrix, Tm, and the text line matrix, Tlm:

           ⎡ a d 0 ⎤
Tm = Tlm = ⎢ b e 0 ⎥
           ⎣ c f 1 ⎦

Tm  = text matrix
Tlm = text line matrix

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.

The matrix specified by the operands shall not be concatenated onto the current text matrix, but shall replace it.

Source

43: nextLine (T*)

Operands

none

PDF Specification

Move to the start of the next line. This operator has the same effect as the code

0 -Tl Td

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.

Source

44: showText (Tj)

Operands

Operands differ between the PDF specification and the implementation in PDF.js.

  • string: string (PDF Specification)
  • glyphs: array (implementation in PDF.js)

PDF Specification

Show a text string.

Source

45: showSpacedText (TJ)

Operands

  • array: ?

PDF Specification

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.

Source

46: nextLineShowText (')

Operands

Operands differ between the PDF specification and the implementation in PDF.js.

  • string: string (PDF Specification)
  • glyphs: array (implementation in PDF.js)

PDF Specification

Move to the next line and show a text string. This operator shall have the same effect as the code

T*
string Tj

Source

47: nextLineSetSpacingShowText (")

Operands

Operands differ between the PDF specification and the implementation in PDF.js.

  • aw: number (same)
  • ac: number (same)
  • string: string (PDF Specification)
  • glyphs: array (implementation in PDF.js)

PDF Specification

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:

aw Tw
ac Tc
string '

Source

48: setCharWidth (d0)

Operands

  • wx: number
  • wy: number

PDF Specification

Set width information for the glyph and declare that the glyph description specifies both its shape and its colour.

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.

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.

Source

49: setCharWidthAndBounds (d1)

Operands

  • wx: number
  • wy: number
  • llx: ?
  • lly: ?
  • urx: ?
  • ury: ?

PDF Specification

Set width and bounding box information for the glyph and declare that the glyph description specifies only shape, not colour.

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.

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.

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.

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.

This operator shall be used only in a content stream appearing in a Type 3 font’s CharProcs dictionary.

Source

50: setStrokeColorSpace (CS)

Operands

  • name: string

PDF Specification

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.

The names DeviceGray, DeviceRGB, DeviceCMYK, and Pattern always identify the corresponding colour spaces directly; they never refer to resources in the ColorSpace subdictionary.

The CS operator shall also set the current stroking colour to its initial value, which depends on the colour space:

  • In a DeviceGray, DeviceRGB, CalGray, or CalRGB colour space, the initial colour shall have all components equal to 0.0.
  • In a DeviceCMYK colour space, the initial colour shall be [ 0.0 0.0 0.0 1.0 ].
  • 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 substituted.
  • In an Indexed colour space, the initial colour value shall be 0.
  • In a Separation or DeviceN colour space, the initial tint value shall be 1.0 for all colorants.
  • In a Pattern colour space, the initial colour shall be a pattern object that causes nothing to be painted.

Source

51: setFillColorSpace (cs)

Operands

  • name: string

PDF Specification

Same as CS (setStrokeColorSpace) but used for nonstroking operations.

Source

52: setStrokeColor (SC)

Operands

For gray color spaces (DeviceGray, CalGray or Indexed):

  • level: number

For RGB color spaces (DeviceRGB, CalRGB or Lab):

  • r: number
  • g: number
  • b: number

For CMYK color spaces (DeviceCMYK):

  • c: number
  • m: number
  • y: number
  • k: number

PDF Specification

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:

  • For DeviceGray, CalGray, and Indexed colour spaces, one operand shall be required (n = 1).
  • For DeviceRGB, CalRGB, and Lab colour spaces, three operands shall be required (n = 3).
  • For DeviceCMYK four operands shall be required (n = 4).

Source

53: setStrokeColorN (SCN)

Operands

  • c1 ... cn (n ≤ 32) or
  • c1 ... cn (n ≤ 32)
  • name

PDF Specification

Same as SC (setStrokeColor) but also supports Pattern, Separation, DeviceN and ICCBased colour spaces.

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.

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.

Source

54: setFillColor (sc)

Operands

For gray color spaces (DeviceGray, CalGray or Indexed):

  • level: number

For RGB color spaces (DeviceRGB, CalRGB or Lab):

  • r: number
  • g: number
  • b: number

For CMYK color spaces (DeviceCMYK):

  • c: number
  • m: number
  • y: number
  • k: number

PDF Specification

Same as SC (setStrokeColor) but used for nonstroking operations.

Source

55: setFillColorN (scn)

Operands

  • c1 ... cn (n ≤ 32) or
  • c1 ... cn (n ≤ 32)
  • name

PDF Specification

Same as SCN (setStrokeColorN) but used for nonstroking operations.

Source

56: setStrokeGray (G)

Operands

  • gray: number - value between 0.0 (black) and 1.0 (white)

PDF Specification

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).

Source

57: setFillGray (g)

Operands

  • gray: number - value between 0.0 (black) and 1.0 (white).

PDF Specification

Same as G (setStrokeGray) but used for nonstroking operations.

Source

58: setStrokeRGBColor (RG)

Operands

  • r: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)
  • g: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)
  • b: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)

PDF Specification

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).

Source

59: setFillRGBColor (rg)

Operands

  • r: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)
  • g: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)
  • b: number - value between 0.0 (minimum intensity) and 1.0 (maximum intensity)

PDF Specification

Same as RG (setStrokeRGBColor) but used for nonstroking operations.

Source

60: setStrokeCMYKColor (K)

Operands

  • c: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • m: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • y: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • k: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)

PDF Specification

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.

Source

61: setFillCMYKColor (k)

Operands

  • c: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • m: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • y: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)
  • k: number - value between 0.0 (zero concentration) and 1.0 (maximum concentration)

PDF Specification

Same as K (setStrokeCMYKColor) but used for nonstroking operations.

Source

62: shadingFill (sh)

Operands

  • name: string

PDF Specification

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.

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 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.

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.

Source

63: beginInlineImage (BI)

Operands

none

PDF Specification

Begin an inline image object.

Source

64: beginImageData (ID)

Operands

none

PDF Specification

Begin the image data for an inline image object.

Source

65: endInlineImage (EI)

Operands

none

PDF Specification

End an inline image object.

Source

66: paintXObject (Do)

Operands

  • name: ?

PDF Specification

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).

Source

67: markPoint (MP)

Operands

  • tag: ?

PDF Specification

Designate a marked-content point. tag shall be a name object indicating the role or significance of the point.

Source

68: markPointProps (DP)

Operands

  • tag: ?
  • properties: ?

PDF Specification

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.

Source

69: beginMarkedContent (BMC)

Operands

  • tag: ?

PDF Specification

Begin a marked-content sequence terminated by a balancing EMC (endMarkedContent) operator. tag shall be a name object indicating the role or significance of the sequence.

Source

70: beginMarkedContentProps (BDC)

Operands

  • tag: ?
  • properties: ?

PDF Specification

Begin a marked-content sequence with an associated property list, terminated by a balancing EMC (endMarkedContent) 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.

Source

71: endMarkedContent (EMC)

Operands

none

PDF Specification

End a marked-content sequence begun by a BMC (beginMarkedContent) or BDC (beginMarkedContentProps) operator.

Source

72: beginCompat (BX)

Operands

none

PDF Specification

Begin a compatibility section. Unrecognized operators (along with their operands) shall be ignored without error until the balancing EX (endCompat) operator is encountered.

Source

73: endCompat (EX)

Operands

none

PDF Specification

End a compatibility section begun by a balancing BX (beginCompat) operator. Ignore any unrecognized operands and operators from previous matching BX onward.

Source

74: paintFormXObjectBegin

Operands

  • matrix: ?
  • bbox: ?

Source

https://github.com/mozilla/pdf.js/.../src/core/evaluator.js#L331

75: paintFormXObjectEnd

Operands

none

Source

76: beginGroup

Operands

  • groupOptions: object
    • matrix: ?
    • bbox: ?
    • smask: ?
    • isolated: boolean (default value: false)
    • knockout: boolean (default value: false)

Source

77: endGroup

Operands

  • groupOptions: object
    • matrix: ?
    • bbox: ?
    • smask: ?
    • isolated: boolean (default value: false)
    • knockout: boolean (default value: false)

Source

78: beginAnnotations

Operands

none

Source

79: endAnnotations

Operands

none

Source

80: beginAnnotation

Operands

  • rect: ?
  • transform: ?
  • matrix: ?

Source

81: endAnnotation

Operands

none

Source

82: paintJpegXObject

  • objId: ?
  • w: number
  • h: number

Source

83: paintImageMaskXObject

Operands

  • imgData: ?

Source

84: paintImageMaskXObjectGroup

Operands

  • images: ?

Source

85: paintImageXObject

Operands

  • objId: ?
  • w: number
  • h: number

Source

86: paintInlineImageXObject

Operands

  • imgData: ?

Source

87: paintInlineImageXObjectGroup

  • imgData: ?
  • map: ?

Source

88: paintImageXObjectRepeat

  • objId: ?
  • scaleX: number
  • scaleY: number
  • positions: ?

Source

89: paintImageMaskXObjectRepeat

  • imgData: ?
  • scaleX: number
  • scaleY: number
  • positions: ?

Source

90: paintSolidColorImageMask

Operands

none

Source

91: constructPath

Operands

Description

Represents a collection of path construction operations. Is there because of speed optimization so paths can be drawn in a batch.

Example

{
  "ops": [ 19, 13, 14 ],
  "args": [ 0, 0, 5, 6, 6, 0, 4, 3 ],
}

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):

  • rectangle: [ 0, 0, 5, 6 ]
  • moveTo: [ 6, 0 ]
  • lineTo: [ 4, 3 ]

Source