public interface Annotation
The common interface implemented by all PDF annotation classes.
All PDF annotations define a range of base attributes, which are accessible using the functions this inteface specifies. It should be noted that none of the attributes that are potentially available through the functions defined in this interface are required to be present for any particular annotation type.
Different types of annotations also carry specialized attributes; PDFTextStream currently supports richer access to these annotation types:
TextAnnotation
FreeTextAnnotation
LinkAnnotation
.
Annotation types not listed above (which are primarily graphical in nature)
are represented by PDFTextStream using a basic Annotation
implementation that allows access
to such annotations' textual attributes.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContents()
Returns the text content of this annotation.
|
java.lang.String |
getModificationDate()
Returns the date, in PDF date format, when this annotation was last modified.
|
java.lang.String |
getName()
Returns the optional name for this annotation, which should uniquely identify it within a page.
|
int |
getPageNumber()
Returns the page with which this annotation is associated.
|
Rectangle |
getRect()
Returns the bounding rectangle where this annotation is located on its page.
|
java.lang.String |
getTypeCd()
Returns a String indicating what type of annotation this this.
|
java.lang.String getContents()
int getPageNumber()
Page
object representing the page's
content using the PDFTextStream.getPage(int)
function.Rectangle getRect()
java.lang.String getName()
java.lang.String getModificationDate()
PDFDateParser
class.
This function may return null if no modification date is present in the annotation data.java.lang.String getTypeCd()