MCPcopy Create free account
hub / github.com/LibPDF-js/core / addHighlightAnnotation

Method addHighlightAnnotation

src/api/pdf-page.ts:1975–1978  ·  view source on GitHub ↗

* Add a highlight annotation. * * @param options - Highlight options (rect, rects, or quadPoints) * @returns The created annotation * * @example * ```typescript * // Simple rect for horizontal text * page.addHighlightAnnotation({ * rect: { x: 100, y: 680, width: 200, hei

(options: TextMarkupAnnotationOptions)

Source from the content-addressed store, hash-verified

1973 * ```
1974 */
1975 addHighlightAnnotation(options: TextMarkupAnnotationOptions): PDFHighlightAnnotation {
1976 // oxlint-disable-next-line typescript/no-unsafe-type-assertion
1977 return this.addTextMarkupAnnotation("Highlight", options) as PDFHighlightAnnotation;
1978 }
1979
1980 /**
1981 * Add an underline annotation.

Callers 3

mainFunction · 0.80

Calls 1

Tested by

no test coverage detected