modern-pdf-lib / createAnnotation
Function: createAnnotation()
createAnnotation(
type,options):PdfAnnotation
Defined in: src/annotation/pdfAnnotation.ts:207
Create a new annotation with the given type and options.
This is a convenience function that creates a generic PdfAnnotation. For type-specific annotations, use the subclass create() methods.
Parameters
type
The annotation subtype.
options
Creation options (rect, contents, etc.).
Returns
A new PdfAnnotation instance.