getObjectNumber

open fun getObjectNumber(): Int

The object number of this annotation inside the PDF document file. This method will only return a valid object number if this annotation is attached to a document (i.e. when isAttached returns true). If the annotation is not attached to any document, this method will return OBJECT_NUMBER_NOT_SET.

Note that there is no guarantee that object numbers stay the same when saving and reopening a document. If a persistent identifier is required, use the getName property instead, which by default is initialized to hold a type 4 (pseudo randomly generated) UUID.

Return

Object number of this annotation or OBJECT_NUMBER_NOT_SET if the annotation is not attached to a document.