[]
DsPdfJS API / AnnotationCollection
Represents a collection of AnnotationBase objects owned by the PdfPage object.
PdfCollection<AnnotationBase>get count():
number
Gets the number of items in the collection.
number
PdfCollection.count
get doc():
PdfDocument
Gets the PdfDocument object that owns this collection.
get id():
number
Gets the reference to the object.
number
PdfCollection.id
get last():
TItem|null
Gets last item in the collection.
TItem | null
PdfCollection.last
get om():
ObjectManager
Gets the owner ObjectManager instance.
PdfCollection.om
get owner():
PdfPage
Gets the PdfPage object that owns this collection.
add(
item):void
Adds an item to the end of the collection.
The item to add.
AnnotationBase | AnnotationProperties
void
PdfCollection.add
clear():
void
Clears the collection.
void
PdfCollection.clear
contains(
item):boolean
Determines whether the item is in the collection.
boolean
true if the item is in the collection, false otherwise.
PdfCollection.contains
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
PdfCollection.free
getAt(
index):AnnotationBase
Gets the item with the specified index.
number
The index of the item.
PdfCollection.getAt
insert(
index,item):void
Inserts an item at a specific position in the collection.
number
The position where the item will be inserted.
The item to insert.
AnnotationBase | AnnotationProperties
void
PdfCollection.insert
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void
PdfCollection.rebind
remove(
item):boolean
Removes the specified item from the collection.
The item to remove.
boolean
true if the item was actually removed, false otherwise.
PdfCollection.remove
removeAt(
index):void
Removes the item at specified index.
number
The index of the item to remove.
void
PdfCollection.removeAt
setAt(
index,item):void
Sets the item at the specified index.
number
The index of the item, starting from 0.
The object to set.
void
PdfCollection.setAt