...master 2026-11-10 (4e7201cfc+unstaged)

PDFAnnotation

PDF Annotations belong to a specific PDFPage and may be created/changed/removed. Because annotation appearances may change (for several reasons) it is possible to scan through the annotations on a page and query them to see whether a re-render is necessary.

Additionally redaction annotations can be applied to a PDFPage, destructively removing content from the page.

Annotation Types

These are the annotation types, and which attributes they have.

Text
An icon with a popup of text.
Set the appearance with the Icon attribute.
Attributes: Rect, Color, Icon.
FreeText
Text in a rectangle on the page.
The text font and color is defined by DefaultAppearance.
Attributes: Border, Rect, Default Appearance.
Line
A line with optional arrow heads.
The line width is determined by the border attribute.
The end points are defined by the Line attribute.
Attributes: Border, Color, Line, Line Ending Styles.
Square
A rectangle.
Attributes: Rect, Rect, Color, Interior Color.
Circle
An ellipse.
Attributes: Rect, Border, Color, Interior Color.
Polygon, PolyLine
A polygon shape (closed and open).
The shape is defined by the Vertices attribute.
The line width is defined by the Border attribute.
Attributes: Vertices, Border, Color, Interior Color, LineEndingStyles.
Highlight, Underline, Squiggly, StrikeOut
Text markups.
The shape is defined by the QuadPoints.
Stamp
A rubber stamp.
The appearance is either a stock name, or a custom image.
Ink
A free-hand line.
The shape is defined by the Ink List attribute.
FileAttachment
A file attachment.
The appearance is an icon on the page.
Set the attached file contents with the Filespec attribute, and the appearance with the Icon attribute.
Redaction
A black box.
Redaction annotations are used to mark areas of the page that can be redacted. They do NOT redact any content by themselves, you MUST apply them using PDFAnnotation.prototype.applyRedaction or PDFPage.prototype.applyRedactions.

These annotation types are special and handled with other APIs:

Constructors

class PDFAnnotation()

You cannot create instances of this class with the new operator!

To get the annotations on a page use PDFPage.prototype.getAnnotations().

To create a new annotation call PDFPage.prototype.createAnnotation().

Instance methods

PDFAnnotation.prototype.getBounds()

Returns a rectangle containing the location and dimension of the annotation.

var bounds = annotation.getBounds()

PDFAnnotation.prototype.run(device, matrix)

Calls the device functions to draw the annotation.

annotation.run(device, mupdf.Matrix.identity)

PDFAnnotation.prototype.toPixmap(matrix, colorspace, alpha)

Render the annotation into a Pixmap, using the transform, colorspace and alpha parameters.

var pixmap = annotation.toPixmap(mupdf.Matrix.identity, mupdf.ColorSpace.DeviceRGB, true)

PDFAnnotation.prototype.toDisplayList()

Record the contents of the annotation into a DisplayList.

var displayList = annotation.toDisplayList()

PDFAnnotation.prototype.getObject()

Get the underlying PDFObject for an annotation.

var obj = annotation.getObject()

PDFAnnotation.prototype.setAppearance(appearance, state, transform, bbox, resources, contents)

Set the annotation appearance stream for the given appearance. The desired appearance is given as a transform along with a bounding box, a PDF dictionary of resources and a content stream.

annotation.setAppearance(
        "N",
        null,
        mupdf.Matrix.identity,
        [0, 0, 100, 100],
        resources,
        contents
)

PDFAnnotation.prototype.update()

Update the appearance stream to account for changes in the annotation.

Returns true if the annotation appearance changed during the call.

annotation.update()

PDFAnnotation.prototype.setAppearanceFromDisplayList(appearance, state, transform, list)

Set the annotation appearance stream for the given appearance. The desired appearance is given as a transform along with a display list.

annotation.setAppearanceFromDisplayList(
        "N",
        null,
        mupdf.Matrix.identity,
        displayList
)

PDFAnnotation.prototype.getHiddenForEditing()

Get a special annotation hidden flag for editing. This flag prevents the annotation from being rendered.

var hidden = annotation.getHiddenForEditing()

PDFAnnotation.prototype.setHiddenForEditing(hidden)

Set a special annotation hidden flag for editing. This flag prevents the annotation from being rendered.

annotation.setHiddenForEditing(true)

PDFAnnotation.prototype.getHot()

only mutool run

Check if the annotation is hot, i.e. that the pointing device’s cursor is hovering over the annotation.

annotation.getHot()

PDFAnnotation.prototype.setHot(hot)

only mutool run

Set the annotation as being hot, i.e. that the pointing device’s cursor is hovering over the annotation.

annotation.setHot(true)

PDFAnnotation.prototype.requestSynthesis()

only mutool run

Request that if an annotation does not have an appearance stream, flag the annotation to have one generated. The appearance stream will be created during future calls to PDFAnnotation.prototype.update() on or PDFPage.prototype.update().

annotation.requestSynthesis()

PDFAnnotation.prototype.requestResynthesis()

only mutool run

Request that an appearance stream shall be re-generated for an annotation next time update() is called on PDFAnnotation.prototype.update() or PDFPage.prototype.update().

This is a side-effect of setting annotation attributes through the PDFAnnotation interface, so normally this call does not need to be done explicitly.

annotation.requestResynthesis()

PDFAnnotation.prototype.process(processor)

only mutool run

Run through the annotation appearance stream and call methods on the supplied PDFProcessor.

annotation.process(processor)

PDFAnnotation.prototype.applyRedaction(blackBoxes, imageMethod, lineArtMethod, textMethod)

Applies a single Redaction annotation.

See PDFPage.prototype.applyRedactions for details.

Annotation attributes

PDF Annotations have many attributes. Some of these are common to all annotations, and some only exist on specific annotation types.

Common

PDFAnnotation.prototype.getType()

Return the annotation type for this annotation.

var type = annotation.getType()

PDFAnnotation.prototype.getFlags()

Get the annotation flags.

See PDFAnnotation.prototype.setFlags.

var flags = annotation.getFlags()

PDFAnnotation.prototype.setFlags(flags)

Set the annotation flags.

Bit Name
1 Invisible
2 Hidden
3 Print
4 NoZoom
5 NoRotate
6 NoView
7 ReadOnly
8 Locked
9 ToggleNoView
10 LockedContents
annotation.setFlags(4) // Clears all other flags and sets "NoZoom".

PDFAnnotation.prototype.getName()

Get the annotation name, a string uniquely identifying the annotation among all annotations on its page.

PDFAnnotation.prototype.setName(name)

Set the annotation name.

PDFAnnotation.prototype.getContents()

Get the annotation contents.

var contents = annotation.getContents()

PDFAnnotation.prototype.setContents(text)

Set the annotation contents.

annotation.setContents("Hello World")

PDFAnnotation.prototype.getCreationDate()

Get the annotation creation date as a Date object.

var date = annotation.getCreationDate()

PDFAnnotation.prototype.setCreationDate(date)

Set the creation date.

annotation.setCreationDate(new Date())

PDFAnnotation.prototype.getModificationDate()

Get the annotation modification date as a Date object.

var date = annotation.getModificationDate()

PDFAnnotation.prototype.setModificationDate(date)

Set the modification date.

annotation.setModificationDate(new Date())

PDFAnnotation.prototype.getLanguage()

Get the annotation language code (or get the one inherited from the document).

var language = annotation.getLanguage()

PDFAnnotation.prototype.setLanguage(language)

Set the annotation language code.

annotation.setLanguage("en")

Rect

For annotations that can be resized by setting its bounding box rectangle (e.g. Square and FreeText), PDFAnnotation.prototype.hasRect() returns true.

Other annotation types, (e.g. Line, Polygon, and InkList) change size by adding/removing vertices. Yet other annotations (e.g. Highlight and StrikeOut) change size by adding/removing QuadPoints.

The underlying Rect attribute on the PDF object is automatically updated as needed for these other annotation types.

PDFAnnotation.prototype.hasRect()

Checks whether the annotation can be resized by setting its bounding box.

var hasRect = annotation.hasRect()

PDFAnnotation.prototype.getRect()

Get the annotation bounding box.

var rect = annotation.getRect()

PDFAnnotation.prototype.setRect(rect)

Set the annotation bounding box.

annotation.setRect([0, 0, 100, 100])

Rich contents

PDFAnnotation.prototype.hasRichContents()

Returns whether the annotation is capable of supporting rich text contents.

var hasRichContents = annotation.hasRichContents()

PDFAnnotation.prototype.getRichContents()

Obtain the annotation’s rich-text contents, as opposed to the plain text contents obtained by getContents().

var richContents = annotation.getRichContents()

PDFAnnotation.prototype.setRichContents(plainText, richText)

Set the annotation’s rich-text contents, as opposed to the plain text contents set by setContents().

annotation.setRichContents("plain text", "<b><i>Rich-Text</i></b>")

PDFAnnotation.prototype.getRichDefaults()

Get the default style used for the annotation’s rich-text contents.

var richDefaults = annotation.getRichDefaults()

PDFAnnotation.prototype.setRichDefaults(style)

Set the default style used for the annotation’s rich-text contents.

annotation.setRichDefaults("font-size: 16pt")

Color

The meaning of the color attribute depends on the annotation type. For some it is the color of the border.

PDFAnnotation.prototype.getColor()

Get the annotation color, represented as an array of 0, 1, 3, or 4 component values.

var color = annotation.getColor()

PDFAnnotation.prototype.setColor(color)

Set the annotation color, represented as an array of 0, 1, 3, or 4 component values.

annotation.setColor([0, 1, 0])

Opacity

PDFAnnotation.prototype.getOpacity()

Get the annotation opacity.

var opacity = annotation.getOpacity()

PDFAnnotation.prototype.setOpacity(opacity)

Set the annotation opacity.

annotation.setOpacity(0.5)

Quadding

PDFAnnotation.prototype.hasQuadding()

only mutool run

Returns whether the annotation is capable of supporting quadding (justification).

var hasQuadding = annotation.hasQuadding()

PDFAnnotation.prototype.getQuadding()

Get the annotation quadding (justification). Quadding value, 0 for left-justified, 1 for centered, 2 for right-justified

var quadding = annotation.getQuadding()

PDFAnnotation.prototype.setQuadding(value)

Set the annotation quadding (justification). Quadding value, 0 for left-justified, 1 for centered, 2 for right-justified.

annotation.setQuadding(1)

Author

PDFAnnotation.prototype.hasAuthor()

Returns whether the annotation is capable of supporting an author.

var hasAuthor = annotation.hasAuthor()

PDFAnnotation.prototype.getAuthor()

Gets the annotation author.

var author = annotation.getAuthor()

PDFAnnotation.prototype.setAuthor(author)

Sets the annotation author.

annotation.setAuthor("Jane Doe")

Subject

PDFAnnotation.prototype.hasSubject()

Returns whether the annotation may have a subject.

var hasSubject = annotation.hasSubject()

PDFAnnotation.prototype.getSubject()

Get the annotation subject.

var subject = annotation.getSubject()

PDFAnnotation.prototype.setSubject(subject)

Set the annotation subject.

annotation.setSubject("Re: Dinner on tuesday?")

Border

PDFAnnotation.prototype.hasBorder()

Returns whether the annotation is capable of supporting a border.

var hasBorder = annotation.hasBorder()

PDFAnnotation.prototype.getBorderStyle()

Get the annotation border style.

var borderStyle = annotation.getBorderStyle()

PDFAnnotation.prototype.setBorderStyle(style)

Set the annotation border style.

annotation.setBorderStyle("Dashed")

PDFAnnotation.prototype.getBorderWidth()

Get the border width in points.

var w = annotation.getBorderWidth()

PDFAnnotation.prototype.setBorderWidth(width)

Set the border width in points. Retains any existing border effects.

annotation.setBorderWidth(1.5)

PDFAnnotation.prototype.getBorderDashCount()

Returns the number of items in the border dash pattern.

var dashCount = annotation.getBorderDashCount()

PDFAnnotation.prototype.getBorderDashItem(idx)

Returns the length of dash pattern item idx.

var length = annotation.getBorderDashItem(0)

PDFAnnotation.prototype.setBorderDashPattern(list)

Set the annotation border dash pattern to the given array of dash item lengths. The supplied array represents the respective line stroke and gap lengths, e.g. [1, 1] sets a small dash and small gap, [2, 1, 4, 1] would set a medium dash, a small gap, a longer dash and then another small gap.

annotation.setBorderDashPattern([2.0, 1.0, 4.0, 1.0])

PDFAnnotation.prototype.clearBorderDash()

Clear the entire border dash pattern for an annotation.

annotation.clearBorderDash()

PDFAnnotation.prototype.addBorderDashItem(length)

Append an item (of the given length) to the end of the border dash pattern.

annotation.addBorderDashItem(10.0)

PDFAnnotation.prototype.hasBorderEffect()

Returns whether the annotation is capable of supporting a border effect.

var hasEffect = annotation.hasBorderEffect()

PDFAnnotation.prototype.getBorderEffect()

Get the border effect.

var effect = annotation.getBorderEffect()

PDFAnnotation.prototype.setBorderEffect(effect)

Set the border effect.

annotation.setBorderEffect("None")

PDFAnnotation.prototype.getBorderEffectIntensity()

Get the annotation border effect intensity.

var intensity = annotation.getBorderEffectIntensity()

PDFAnnotation.prototype.setBorderEffectIntensity(intensity)

Set the annotation border effect intensity. Recommended values are between 0 and 2 inclusive.

annotation.setBorderEffectIntensity(1.5)

Callout

Callouts are used with FreeText annotations and allow for a graphical line to point to an area on a page.

Callout annotation

PDFAnnotation.prototype.hasCallout()

Returns whether the annotation is capable of supporting a callout.

PDFAnnotation.prototype.setCalloutLine(line)

Takes an array of 2 or 3 points. Supply an empty array to remove the callout line.

PDFAnnotation.prototype.getCalloutLine()

Returns the array of points.

PDFAnnotation.prototype.setCalloutPoint(p)

Takes a point where the callout should point to.

PDFAnnotation.prototype.getCalloutPoint()

Returns the callout point.

PDFAnnotation.prototype.setCalloutStyle(style)

Sets the line ending style of the callout line.

PDFAnnotation.prototype.getCalloutStyle()

Returns the callout style.

Default Appearance

PDFAnnotation.prototype.hasDefaultAppearance()

only mutool run

Returns whether the annotation is capable of supporting a default appearance.

var hasRect = annotation.hasDefaultAppearance()

PDFAnnotation.prototype.getDefaultAppearance()

Get the default text appearance used for free text annotations as an object containing the font, size, and color.

var appearance = annotation.getDefaultAppearance()
console.log("DA font:", appearance.font, appearance.size)
console.log("DA color:", appearance.color)

PDFAnnotation.prototype.setDefaultAppearance(font, size, color)

Set the default text appearance used for free text annotations.

annotation.setDefaultAppearance("Helv", 16, [0, 0, 0])

Filespec

PDFAnnotation.prototype.hasFilespec()

Returns whether the annotation is capable of supporting a file specification.

var hasFilespec = annotation.hasFilespec()

PDFAnnotation.prototype.getFilespec()

Get the file specification PDF object for the file attachment, or null if none set.

var fs = annotation.getFilespec()

PDFAnnotation.prototype.setFilespec(fs)

Set the file specification PDF object for the file attachment.

annotation.setFilespec(fs)

Icon

PDFAnnotation.prototype.hasIcon()

Returns whether the annotation is capable of supporting an icon.

var hasIcon = annotation.hasIcon()

PDFAnnotation.prototype.getIcon()

Get the annotation icon name, either a standard or custom name.

var icon = annotation.getIcon()

PDFAnnotation.prototype.setIcon(name)

Set the annotation icon name.

Note that standard icon names can be used to resynthesize the annotation appearance, but custom names cannot.

annotation.setIcon("Note")

Ink List

Ink annotations consist of a number of strokes, each consisting of a sequence of vertices between which a smooth line will be drawn.

PDFAnnotation.prototype.hasInkList()

Returns whether the annotation is capable of supporting an ink list.

var hasInkList = annotation.hasInkList()

PDFAnnotation.prototype.getInkList()

Get the annotation ink list, represented as an array of strokes. Each stroke consists of an array of points.

var inkList = annotation.getInkList()

PDFAnnotation.prototype.setInkList(inkList)

Set the annotation ink list, represented as an array of strokes. Each stroke consists of an array of points.

// this draws a box with a cross in three strokes:
annotation.setInkList([
        [
                [0, 0], [10, 0], [10, 10], [0, 10], [0, 0]
        ],
        [
                [10, 0], [0, 10]
        ],
        [
                [0, 0], [10, 10]
        ]
])

PDFAnnotation.prototype.clearInkList()

Clear the list of ink strokes for the annotation.

annotation.clearInkList()

PDFAnnotation.prototype.addInkListStroke()

Add a new empty stroke to the ink annotation.

annotation.addInkListStroke()

PDFAnnotation.prototype.addInkListStrokeVertex(v)

Append a vertex to end of the last stroke in the ink annotation.

annotation.addInkListStrokeVertex([0, 0])

Interior Color

PDFAnnotation.prototype.hasInteriorColor()

Returns whether the annotation is capable of supporting an interior color.

var hasInteriorColor = annotation.hasInteriorColor()

PDFAnnotation.prototype.getInteriorColor()

Get the annotation interior color, represented as an array of 0, 1, 3, or 4 component values.

var interiorColor = annotation.getInteriorColor()

PDFAnnotation.prototype.setInteriorColor(color)

Sets the annotation interior color.

annotation.setInteriorColor([0, 1, 1])

Line

PDFAnnotation.prototype.hasLine()

Returns whether the annotation is capable of supporting a line.

var hasLine = annotation.hasLine()

PDFAnnotation.prototype.getLine()

Get line end points, represented by an array of two points, each represented as an [x, y] array.

var line = annotation.getLine()

PDFAnnotation.prototype.setLine(a, b)

Set the two line end points, each represented as an [x, y] array.

annotation.setLine([100, 100], [150, 175])

Line Ending Styles

PDFAnnotation.prototype.hasLineEndingStyles()

Returns whether the annotation is capable of supporting line ending style.

var hasLineEndingStyles = annotation.hasLineEndingStyles()

PDFAnnotation.prototype.getLineEndingStyles()

Get the start and end line ending style values for each end of the line annotation.

var lineEndingStyles = annotation.getLineEndingStyles()

PDFAnnotation.prototype.setLineEndingStyles(start, end)

Sets the line ending style values for each end of the line annotation.

annotation.setLineEndingStyles("Square", "OpenArrow")

Line Leaders

In a PDF line leaders refer to two lines at the ends of the line annotation, oriented perpendicular to the line itself. These are common in technical drawings when illustrating distances.

Leader lines explained

PDFAnnotation.prototype.setLineLeader(v)

Sets the line leader length.

Setting a value of 0 effectively removes the line leader.

PDFAnnotation.prototype.getLineLeader()

Gets the line leader length.

PDFAnnotation.prototype.setLineLeaderExtension(v)

Sets the line leader extension.

Setting a value of 0 effectively removes the line leader extension.

PDFAnnotation.prototype.getLineLeaderExtension()

Gets the line leader extension.

PDFAnnotation.prototype.setLineLeaderOffset(v)

Sets the line leader offset.

Setting a value of 0 effectively removes the line leader offset.

PDFAnnotation.prototype.getLineLeaderOffset()

Gets the line leader offset.

PDFAnnotation.prototype.setLineCaption(on)

Sets whether line caption is enabled or not.

When line captions are enabled then calling the PDFAnnotation.prototype.setContents on the line annotation will render the contents onto the line as the caption text.

PDFAnnotation.prototype.getLineCaption()

Returns whether the line caption is enabled or not.

PDFAnnotation.prototype.setLineCaptionOffset(point)

Sets the line caption offset.

The x value of the offset point is the horizontal offset along the annotation line from its midpoint, with a positive value indicating offset to the right and a negative value indicating offset to the left. The y value of the offset point is the vertical offset perpendicular to the annotation line, with a positive value indicating a shift up and a negative value indicating a shift down.

Setting a point of [0, 0] removes the caption offset.

Offset caption explained * Arguments: - point (Point) – A point specifying the offset of the caption text from its normal position.

PDFAnnotation.prototype.getLineCaptionOffset()

Returns the line caption offset as a point, [x, y].

Open

Open refers to whether the annotation is display in an open state when the page is loaded. A Text Note annotation is considered open if the user has clicked on it to view its contents.

PDFAnnotation.prototype.hasOpen()

Returns whether the annotation is capable of supporting annotation open state.

var hasOpen = annotation.hasOpen()

PDFAnnotation.prototype.getIsOpen()

Get annotation open state.

var isOpen = annotation.getIsOpen()

PDFAnnotation.prototype.setIsOpen(state)

Set annotation open state.

annotation.setIsOpen(true)

PDFAnnotation.prototype.hasPopup()

only mutool run

Returns whether the annotation is capable of supporting a popup.

var hasPopup = annotation.hasPopup()

PDFAnnotation.prototype.getPopup()

Get annotation popup rectangle.

var popupRect = annotation.getPopup()

PDFAnnotation.prototype.setPopup(rect)

Set annotation popup rectangle.

annotation.setPopup([0, 0, 100, 100])

QuadPoints

Text markup and redaction annotations consist of a set of quadadrilaterals, or QuadPoints. These are used in e.g. Highlight annotations to mark up several disjoint spans of text.

In Javascript QuadPoints are represented with Quad objects.

PDFAnnotation.prototype.hasQuadPoints()

Returns whether the annotation is capable of supporting quadpoints.

var hasQuadPoints = annotation.hasQuadPoints()

PDFAnnotation.prototype.getQuadPoints()

Get the annotation’s quadpoints, describing the areas affected by text markup annotations and link annotations.

var quadPoints = annotation.getQuadPoints()

PDFAnnotation.prototype.setQuadPoints(quadList)

Set the annotation quadpoints describing the areas affected by text markup annotations and link annotations.

// two quads, the first one wider than the second one
annotation.setQuadPoints([
        [ 100, 100, 200, 100, 200, 150, 100, 150 ],
        [ 125, 150, 175, 150, 175, 200, 125, 200 ]
])

PDFAnnotation.prototype.clearQuadPoints()

Clear the list of quadpoints for the annotation.

annotation.clearQuadPoints()

PDFAnnotation.prototype.addQuadPoint(quad)

Append a single quadpoint to the annotation.

annotation.addQuadPoint([1, 2, 3, 4, 5, 6, 7, 8])

Vertices

Polygon and polyline annotations consist of a sequence of vertices with a straight line between them. Those can be controlled by:

PDFAnnotation.prototype.hasVertices()

Returns whether the annotation is capable of supporting vertices.

var hasVertices = annotation.hasVertices()

PDFAnnotation.prototype.getVertices()

Get the annotation vertices, represented as an array of points.

var vertices = annotation.getVertices()

PDFAnnotation.prototype.setVertices(vertices)

Set the annotation vertices, represented as an array of points.

annotation.setVertices([
        [0, 0],
        [10, 10],
        [20, 20]
])

PDFAnnotation.prototype.clearVertices()

Clear the list of vertices for the annotation.

annotation.clearVertices()

PDFAnnotation.prototype.addVertex(vertex)

Append a single vertex point to the annotation.

annotation.addVertex([0, 0])

Stamp image

PDFAnnotation.prototype.getStampImageObject()

only mutool run

If the annotation is a stamp annotation and it consists of an image, return the PDFObject representing that image.

var pdfobj = annotation.getStampImageObject()

PDFAnnotation.prototype.setStampImageObject(imgobj)

only mutool run

Create an appearance stream containing the image passed as argument and set that as the normal appearance of the annotation.

annotation.setStampImageObject(imgobj)

PDFAnnotation.prototype.setStampImage(img)

only mutool run

Add the image passed as argument to the document as a PDF object, and pass a reference to that object to when setting the normal appearance of the stamp annotation.

annotation.setStampImage(img)

Intent

PDFAnnotation.prototype.hasIntent()

only mutool run

Returns whether the annotation is capable of supporting an intent.

var hasIntent = annotation.hasIntent()

PDFAnnotation.prototype.getIntent()

Get the annotation intent, one of the values below:

var intent = annotation.getIntent()

PDFAnnotation.prototype.setIntent(intent)

Set the annotation intent.

annotation.setIntent("LineArrow")

Events

PDF annotations can have different appearances depending on whether the pointing device’s cursor is hovering over an annotation, or if the pointing device’s button is pressed.

PDF widgets, which is a type of annotation, may also have associated Javascript functions that are executed when certain events occur.

Therefore it is important to tell an PDFAnnotation when the pointing device’s cursor enters/exits an annotation, when it’s button is clicked, or when an annotation gains/loses input focus.

PDFAnnotation.prototype.eventEnter()

only mutool run

Trigger appearance changes and event handlers for when the pointing device’s cursor enters an annotation’s active area.

annot.eventEnter()

PDFAnnotation.prototype.eventExit()

only mutool run

Trigger appearance changes and event handlers for when the pointing device’s cursor exits an annotation’s active area.

annot.eventExit()

PDFAnnotation.prototype.eventDown()

only mutool run

Trigger appearance changes and event handlers for when the pointing device’s button is depressed within an annotation’s active area.

widget.eventDown()

PDFAnnotation.prototype.eventUp()

only mutool run

Trigger appearance changes and event handlers for when the pointing device’s button is released within an annotation’s active area.

widget.eventUp()

PDFAnnotation.prototype.eventFocus()

only mutool run

Trigger event handlers for when an annotation gains input focus.

widget.eventFocus()

PDFAnnotation.prototype.eventBlur()

only mutool run

Trigger event handlers for when an annotation loses input focus.

widget.eventBlur()