An annotation associates an object to a specific location on a Page. Annotations are the core of all pdf widgets including AcroForm fields, sticky notes, links, etc... In nopodofo an Annotation may only be created via createAnnotation. Annotations are a lower level PDF object, please familiarize yourself with the PDF Spec for usage.
class Annotation {
flags: NPDFAnnotationFlag
title: string
content: string
destination: Destination
action: Action
open: boolean
quadPoints: number[]
color: Color
attachment: FileSpec
setBorderStyle(v: NPDFAnnotationBorderStyle): void
hasAppearanceStream(): boolean
setAppearanceStream(xobj: XObject): void
getType(): NPDFAnnotationType
}
This gets or sets the NPDFAnnotationFlag value of the annotations F
property.
This gets or sets the annotations title T
property.
This property gets or sets an annotations content Contents
property. The content of an annotation is an optional
property responsible for displaying text for the annotation, or an alternate description. This can be useful for accessiblity
to users with disablities.
This gets or sets an Destination object for link type annotations, the Destination is displayed when the annotation is activated.
This gets or sets an Action object in the annotation Dictionary. The Actions action will be performed when the annotation is activated.
This gets or sets the open property. An annotation may be in one of two states, open or closed. When closed the annotation will appear on the page as an icon, box or stamp, when a closed annotation is clicked it becomes activated performing exhibiting it's associated object.
setBorderStyle(v: NPDFAnnotationBorderStyle): void
An annotation my optionally be surrounded with a styled border when displayed or printed. This method will set the BS
dictionary with the
NPDFAnnotationBorderStyle value provied as the first parameter.
hasAppearanceStream(): boolean
If an appearance stream AS
is present in the annotation Dictionary returns true, else false.
setAppearanceStream(xobj: XObject): void
Set the appearance stream AS
property of the annotation Dictionary.
getType(): NPDFAnnotationType
Get the type of annotation as an NPDFAnnotationType value.