* Add a text annotation (sticky note). * * @param options - Text annotation options * @returns The created annotation
(options: TextAnnotationOptions)
| 2103 | * @returns The created annotation |
| 2104 | */ |
| 2105 | addTextAnnotation(options: TextAnnotationOptions): PDFTextAnnotation { |
| 2106 | const annotDict = PDFTextAnnotation.create(options); |
| 2107 | |
| 2108 | // Register and add to page |
| 2109 | const annotRef = this.ctx.register(annotDict); |
| 2110 | this.addAnnotationRef(annotRef); |
| 2111 | |
| 2112 | // oxlint-disable-next-line typescript/no-unsafe-type-assertion |
| 2113 | return createAnnotation(annotDict, annotRef, this.ctx.registry) as PDFTextAnnotation; |
| 2114 | } |
| 2115 | |
| 2116 | /** |
| 2117 | * Add a line annotation. |
no test coverage detected