* Add a line annotation. * * @param options - Line annotation options * @returns The created annotation
(options: LineAnnotationOptions)
| 2120 | * @returns The created annotation |
| 2121 | */ |
| 2122 | addLineAnnotation(options: LineAnnotationOptions): PDFLineAnnotation { |
| 2123 | const annotDict = PDFLineAnnotation.create(options); |
| 2124 | |
| 2125 | // Register and add to page |
| 2126 | const annotRef = this.ctx.register(annotDict); |
| 2127 | this.addAnnotationRef(annotRef); |
| 2128 | |
| 2129 | // oxlint-disable-next-line typescript/no-unsafe-type-assertion |
| 2130 | return createAnnotation(annotDict, annotRef, this.ctx.registry) as PDFLineAnnotation; |
| 2131 | } |
| 2132 | |
| 2133 | /** |
| 2134 | * Add a square (rectangle) annotation. |
no test coverage detected