getCopy

open fun getCopy(@IntRange(from = 0) pageIndex: Int): Annotation

Creates a copy of this annotation that isn't attached to the document with the page index set to given index. If this type of annotation can't be copied this method will return null.

Note: This will reset the name of the resulting annotation to an automatically generated UUID if you want to keep the original name you have to manually set it on the returned copy.

Return

A copy of this annotation or null if no copy could be made.

Parameters

pageIndex

The page index the copied annotation should belong to.