| Modifier and Type | Field and Description |
|---|---|
| private final COSDictionary | |
| private static final int | FLAG_HIDDEN
An annotation flag. |
| private static final int | FLAG_INVISIBLE
An annotation flag. |
| private static final int | FLAG_LOCKED
An annotation flag. |
| private static final int | FLAG_LOCKED_CONTENTS
An annotation flag. |
| private static final int | FLAG_NO_ROTATE
An annotation flag. |
| private static final int | FLAG_NO_VIEW
An annotation flag. |
| private static final int | FLAG_NO_ZOOM
An annotation flag. |
| private static final int | FLAG_PRINTED
An annotation flag. |
| private static final int | FLAG_READ_ONLY
An annotation flag. |
| private static final int | FLAG_TOGGLE_NO_VIEW
An annotation flag. |
| private static final Log | LOG
Log instance. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | constructAppearances(PDDocument
the related document document)Create the appearance entry for this annotation. |
| public void | |
| public static PDAnnotation | Returns: The correctly typed annotation object, never null.The COS object that is the annotation. base)Create the correct annotation from the base COS object. |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| public String | Returns: The identifying name for the Annotation.This will get the name, a string intended to uniquely identify each annotation within a page. |
| public PDAppearanceDictionary | Returns: This annotations appearance.This will get the appearance dictionary associated with this annotation. |
| public COSName | Returns: the annotations appearance stateReturns the annotations appearance state, which selects the applicable appearance stream from an appearance subdictionary. |
| public COSArray | |
| public PDColor | Returns: Color object representing the colourThis will retrieve the color used in drawing various elements. |
| protected PDColor | |
| public String | |
| public COSDictionary | Returns: This object as a standard COS object.Implements org. Interface method for COSObjectable. |
| public String | Returns: the modified date/time (often in date format, but can be an arbitrary string).This will retrieve the date and time the annotation was modified. |
| public PDAppearanceStream | Returns: the appearance streamReturns the appearance stream for this annotation, if any. |
| public PDPropertyList | Returns: The optional content group or optional content membership dictionary or null if there is none.This will get the optional content group or optional content membership dictionary for the annotation. |
| public PDPage | Returns: The corresponding page or null if not available.This will retrieve the corresponding page of this annotation. |
| public PDRectangle | Returns: The Rect value of this annotation.The annotation rectangle, defining the location of the annotation on the page in default user space units. |
| public int | Returns: the integer key of the annotation's entry in the structural parent tree or -1 if there isn't any.This will get the key of this annotation in the structural parent tree. |
| public final String | Returns: The subtype of this annotation, see the SUB_TYPE_XXX constants.This will retrieve the subtype of the annotation. |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| public void | setAnnotationName(String
The identifying name for the annotation. nm)This will set the name, a string intended to uniquely identify each annotation within a page. |
| public void | setAppearance(PDAppearanceDictionary
The appearance dictionary for this annotation. appearance)This will set the appearance associated with this annotation. |
| public void | setAppearanceState(String
The name of the appearance stream. as)This will set the annotations appearance state name. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setLockedContents(boolean
The new LockedContents flag value. lockedContents)Set the LockedContents flag. |
| public void | setModifiedDate(String
the date and time the annotation was created. Date values used in a PDF shall
conform to a standard date format, which closely follows that of the international standard
ASN.1 (Abstract Syntax Notation One), defined in ISO/IEC 8824. A date shall be a text string
of the form (D:YYYYMMDDHHmmSSOHH'mm). Alternatively, use
m)setModifiedDate(java.This will set the date and time the annotation was modified. |
| public void | setModifiedDate(Calendar
the date and time the annotation was created. c)This will set the date and time the annotation was modified. |
| public void | |
| public void | |
| public void | |
| public void | setOptionalContent(PDPropertyList
The optional content group or optional content membership dictionary. oc)Sets the optional content group or optional content membership dictionary for the annotation. |
| public void | |
| public void | |
| public void | |
| public void | setRectangle(PDRectangle
The new rectangle values. rectangle)This will set the rectangle for this annotation. |
| public void | setStructParent(int
The new key for this annotation. structParent)This will set the key for this annotation in the structural parent tree. |
| protected final void | setSubtype(String
The subtype of the annotation subType)This will set the sub type (and hence appearance, AP taking precedence) For this annotation. |
| public void |
| dictionary | back to summary |
|---|---|
| private final COSDictionary dictionary | |
| FLAG_HIDDEN | back to summary |
|---|---|
| private static final int FLAG_HIDDEN An annotation flag. | |
| FLAG_INVISIBLE | back to summary |
|---|---|
| private static final int FLAG_INVISIBLE An annotation flag. | |
| FLAG_LOCKED | back to summary |
|---|---|
| private static final int FLAG_LOCKED An annotation flag. | |
| FLAG_LOCKED_CONTENTS | back to summary |
|---|---|
| private static final int FLAG_LOCKED_CONTENTS An annotation flag.
| |
| FLAG_NO_ROTATE | back to summary |
|---|---|
| private static final int FLAG_NO_ROTATE An annotation flag. | |
| FLAG_NO_VIEW | back to summary |
|---|---|
| private static final int FLAG_NO_VIEW An annotation flag. | |
| FLAG_NO_ZOOM | back to summary |
|---|---|
| private static final int FLAG_NO_ZOOM An annotation flag. | |
| FLAG_PRINTED | back to summary |
|---|---|
| private static final int FLAG_PRINTED An annotation flag. | |
| FLAG_READ_ONLY | back to summary |
|---|---|
| private static final int FLAG_READ_ONLY An annotation flag. | |
| FLAG_TOGGLE_NO_VIEW | back to summary |
|---|---|
| private static final int FLAG_TOGGLE_NO_VIEW An annotation flag. | |
| LOG | back to summary |
|---|---|
| private static final Log LOG Log instance. | |
| PDAnnotation | back to summary |
|---|---|
| public PDAnnotation() Constructor. | |
| PDAnnotation | back to summary |
|---|---|
| public PDAnnotation(COSDictionary dict) Constructor.
| |
| constructAppearances | back to summary |
|---|---|
| public void constructAppearances(PDDocument document) Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing.
| |
| constructAppearances | back to summary |
|---|---|
| public void constructAppearances() Create the appearance entry for this annotation. Not having it may prevent display in some viewers. This method is for overriding in subclasses, the default implementation does nothing. | |
| createAnnotation | back to summary |
|---|---|
| public static PDAnnotation createAnnotation(COSBase base) throws IOException Create the correct annotation from the base COS object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAnnotationFlags | back to summary |
|---|---|
| public int getAnnotationFlags() This will get the flags for this field.
| |
| getAnnotationName | back to summary |
|---|---|
| public String getAnnotationName() This will get the name, a string intended to uniquely identify each annotation within a page. Not to be confused with some annotations Name entry which impact the default image drawn for them.
| |
| getAppearance | back to summary |
|---|---|
| public PDAppearanceDictionary getAppearance() This will get the appearance dictionary associated with this annotation. This may return null.
| |
| getAppearanceState | back to summary |
|---|---|
| public COSName getAppearanceState() Returns the annotations appearance state, which selects the applicable appearance stream from an appearance subdictionary.
| |
| getBorder | back to summary |
|---|---|
| public COSArray getBorder() This will retrieve the border array. If none is available then it will create and return a default array, which is [0 0 1]. The array consists of at least three numbers defining the horizontal corner radius, vertical corner radius, and border width. The array may have a fourth element, an optional dash array defining a pattern of dashes and gaps that shall be used in drawing the border. If the array has less than three elements, the original array will be copied and missing elements with value 0 will be added.
| |
| getColor | back to summary |
|---|---|
| public PDColor getColor() This will retrieve the color used in drawing various elements. As of PDF 1.6 these are :
| |
| getColor | back to summary |
|---|---|
| protected PDColor getColor(COSName itemName) | |
| getContents | back to summary |
|---|---|
| public String getContents() Get the "contents" of the field.
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Interface method for COSObjectable.
| |
| getModifiedDate | back to summary |
|---|---|
| public String getModifiedDate() This will retrieve the date and time the annotation was modified.
| |
| getNormalAppearanceStream | back to summary |
|---|---|
| public PDAppearanceStream getNormalAppearanceStream() Returns the appearance stream for this annotation, if any. The annotation state is taken into account, if present.
| |
| getOptionalContent | back to summary |
|---|---|
| public PDPropertyList getOptionalContent() This will get the optional content group or optional content membership dictionary for the annotation.
| |
| getPage | back to summary |
|---|---|
| public PDPage getPage() This will retrieve the corresponding page of this annotation. See also this answer about what to do if the page isn't available.
| |
| getRectangle | back to summary |
|---|---|
| public PDRectangle getRectangle() The annotation rectangle, defining the location of the annotation on the page in default user space units. This is usually required and should not return null on valid PDF documents. But where this is a parent form field with children, such as radio button collections then the rectangle will be null.
| |
| getStructParent | back to summary |
|---|---|
| public int getStructParent() This will get the key of this annotation in the structural parent tree.
| |
| getSubtype | back to summary |
|---|---|
| public final String getSubtype() This will retrieve the subtype of the annotation.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isHidden | back to summary |
|---|---|
| public boolean isHidden() Get the hidden flag.
| |
| isInvisible | back to summary |
|---|---|
| public boolean isInvisible() Get the invisible flag.
| |
| isLocked | back to summary |
|---|---|
| public boolean isLocked() Get the locked flag.
| |
| isLockedContents | back to summary |
|---|---|
| public boolean isLockedContents() Get the LockedContents flag.
| |
| isNoRotate | back to summary |
|---|---|
| public boolean isNoRotate() Get the noRotate flag.
| |
| isNoView | back to summary |
|---|---|
| public boolean isNoView() Get the noView flag.
| |
| isNoZoom | back to summary |
|---|---|
| public boolean isNoZoom() Get the noZoom flag.
| |
| isPrinted | back to summary |
|---|---|
| public boolean isPrinted() Get the printed flag.
| |
| isReadOnly | back to summary |
|---|---|
| public boolean isReadOnly() Get the readOnly flag.
| |
| isToggleNoView | back to summary |
|---|---|
| public boolean isToggleNoView() Get the toggleNoView flag.
| |
| setAnnotationFlags | back to summary |
|---|---|
| public void setAnnotationFlags(int flags) This will set the flags for this field.
| |
| setAnnotationName | back to summary |
|---|---|
| public void setAnnotationName(String nm) This will set the name, a string intended to uniquely identify each annotation within a page. Not to be confused with some annotations Name entry which impact the default image drawn for them.
| |
| setAppearance | back to summary |
|---|---|
| public void setAppearance(PDAppearanceDictionary appearance) This will set the appearance associated with this annotation.
| |
| setAppearanceState | back to summary |
|---|---|
| public void setAppearanceState(String as) This will set the annotations appearance state name.
| |
| setBorder | back to summary |
|---|---|
| public void setBorder(COSArray borderArray) This will set the border array.
| |
| setColor | back to summary |
|---|---|
| public void setColor(PDColor c) This will set the color used in drawing various elements. As of PDF 1.6 these are : Background of icon when closed Title bar of popup window Border of a link annotation Colour is in DeviceRGB colourspace
| |
| setContents | back to summary |
|---|---|
| public void setContents(String value) Set the "contents" of the field.
| |
| setHidden | back to summary |
|---|---|
| public void setHidden(boolean hidden) Set the hidden flag.
| |
| setInvisible | back to summary |
|---|---|
| public void setInvisible(boolean invisible) Set the invisible flag.
| |
| setLocked | back to summary |
|---|---|
| public void setLocked(boolean locked) Set the locked flag.
| |
| setLockedContents | back to summary |
|---|---|
| public void setLockedContents(boolean lockedContents) Set the LockedContents flag. If set, do not allow the contents of the annotation to be modified by the user. This flag does not restrict deletion of the annotation or changes to other annotation properties, such as position and size.
| |
| setModifiedDate | back to summary |
|---|---|
| public void setModifiedDate(String m) This will set the date and time the annotation was modified.
| |
| setModifiedDate | back to summary |
|---|---|
| public void setModifiedDate(Calendar c) This will set the date and time the annotation was modified.
| |
| setNoRotate | back to summary |
|---|---|
| public void setNoRotate(boolean noRotate) Set the noRotate flag.
| |
| setNoView | back to summary |
|---|---|
| public void setNoView(boolean noView) Set the noView flag.
| |
| setNoZoom | back to summary |
|---|---|
| public void setNoZoom(boolean noZoom) Set the noZoom flag.
| |
| setOptionalContent | back to summary |
|---|---|
| public void setOptionalContent(PDPropertyList oc) Sets the optional content group or optional content membership dictionary for the annotation.
| |
| setPage | back to summary |
|---|---|
| public void setPage(PDPage page) This will set the corresponding page for this annotation. This is optional but recommended. Not doing it can cause trouble when PDFs get signed.
| |
| setPrinted | back to summary |
|---|---|
| public void setPrinted(boolean printed) Set the printed flag.
| |
| setReadOnly | back to summary |
|---|---|
| public void setReadOnly(boolean readOnly) Set the readOnly flag.
| |
| setRectangle | back to summary |
|---|---|
| public void setRectangle(PDRectangle rectangle) This will set the rectangle for this annotation.
| |
| setStructParent | back to summary |
|---|---|
| public void setStructParent(int structParent) This will set the key for this annotation in the structural parent tree.
| |
| setSubtype | back to summary |
|---|---|
| protected final void setSubtype(String subType) This will set the sub type (and hence appearance, AP taking precedence) For this annotation. See the SUB_TYPE_XXX constants for valid values.
| |
| setToggleNoView | back to summary |
|---|---|
| public void setToggleNoView(boolean toggleNoView) Set the toggleNoView flag.
| |