FLAG_HIDDEN
public static final int FLAG_HIDDEN
An annotation flag.
FLAG_INVISIBLE
public static final int FLAG_INVISIBLE
An annotation flag.
FLAG_LOCKED
public static final int FLAG_LOCKED
An annotation flag.
FLAG_NO_ROTATE
public static final int FLAG_NO_ROTATE
An annotation flag.
FLAG_NO_VIEW
public static final int FLAG_NO_VIEW
An annotation flag.
FLAG_NO_ZOOM
public static final int FLAG_NO_ZOOM
An annotation flag.
FLAG_PRINTED
public static final int FLAG_PRINTED
An annotation flag.
FLAG_READ_ONLY
public static final int FLAG_READ_ONLY
An annotation flag.
FLAG_TOGGLE_NO_VIEW
public static final int FLAG_TOGGLE_NO_VIEW
An annotation flag.
createAnnotation
public static PDAnnotation createAnnotation(COSBase base)
throws IOException
Create the correct annotation from the base COS object.
base
- The COS object that is the annotation.
- The correctly typed annotation object.
getAction
public PDAction getAction()
throws IOException
Get the action to be performed when this annotation is to be activated.
- The action to be performed when this annotation is activated.
getActions
public PDAdditionalActions getActions()
Get the additional actions for this field. This will return null
if there are no additional actions for this field.
As of PDF 1.6 this is only used for Widget Annotations.
- The actions of the field.
getAnnotationFlags
public int getAnnotationFlags()
This will get the flags for this field.
getAnnotationName
public String getAnnotationName()
This will get the name, a string intended to uniquely identify each annotatoin
within a page. Not to be confused with some annotations Name entry which
impact the default image drawn for them.
- The identifying name for the Annotion.
getAppearance
public PDAppearanceDictionary getAppearance()
This will get the appearance dictionary associated with this annotation.
This may return null.
- This annotations appearance.
getAppearanceStream
public String getAppearanceStream()
This will get the name of the current appearance stream if any.
- The name of the appearance stream.
getBoderStyle
public PDBorderStyleDictionary getBoderStyle()
This will retrieve the border style dictionary, specifying the width and
dash pattern used in drawing the line.
- the border style dictionary.
getColour
public PDGamma getColour()
This will retrieve the colour 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
- PDGamma object representing the colour
getContents
public String getContents()
Get the "contents" of the field.
- the value of the contents.
getDictionary
public COSDictionary getDictionary()
returns the dictionary.
getModifiedDate
public String getModifiedDate()
This will retrieve the date and time the annotation was modified.
- the modified date/time (often in date format, but can be an arbitary string).
getRectangle
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.
- The Rect value of this annotation.
isHidden
public boolean isHidden()
Get the hidden flag.
isInvisible
public boolean isInvisible()
Get the invisible flag.
isLocked
public boolean isLocked()
Get the locked flag.
isNoRotate
public boolean isNoRotate()
Get the noRotate flag.
isNoView
public boolean isNoView()
Get the noView flag.
isNoZoom
public boolean isNoZoom()
Get the noZoom flag.
isPrinted
public boolean isPrinted()
Get the printed flag.
isReadOnly
public boolean isReadOnly()
Get the readOnly flag.
isToggleNoView
public boolean isToggleNoView()
Get the toggleNoView flag.
setAction
public void setAction(PDAction action)
Set the annotation action.
As of PDF 1.6 this is only used for Widget Annotations
action
- The annotation action.
setActions
public void setActions(PDAdditionalActions actions)
Set the actions of the field.
actions
- The field actions.
setAnnotationFlags
public void setAnnotationFlags(int flags)
This will set the flags for this field.
setAnnotationName
public void setAnnotationName(String nm)
This will set the name, a string intended to uniquely identify each annotatoin
within a page. Not to be confused with some annotations Name entry which
impact the default image drawn for them.
nm
- The identifying name for the annotation.
setAppearance
public void setAppearance(PDAppearanceDictionary appearance)
This will set the appearance associated with this annotation.
appearance
- The appearance dictionary for this annotation.
setAppearanceStream
public void setAppearanceStream(String as)
This will set the annotations appearance stream name.
as
- The name of the appearance stream.
setBorderStyle
public void setBorderStyle(PDBorderStyleDictionary bs)
This will set the border style dictionary, specifying the width and dash
pattern used in drawing the line.
bs
- the border style dictionary to set.
setColour
public void setColour(PDGamma c)
This will set the colour 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
c
- colour in the DeviceRGB colourspace
setContents
public void setContents(String value)
Set the "contents" of the field.
value
- the value of the contents.
setHidden
public void setHidden(boolean hidden)
Set the hidden flag.
hidden
- The new hidden flag.
setInvisible
public void setInvisible(boolean invisible)
Set the invisible flag.
invisible
- The new invisible flag.
setLocked
public void setLocked(boolean locked)
Set the locked flag.
locked
- The new locked flag.
setModifiedDate
public void setModifiedDate(String m)
This will set the the date and time the annotation was modified.
m
- the date and time the annotation was created.
setNoRotate
public void setNoRotate(boolean noRotate)
Set the noRotate flag.
noRotate
- The new noRotate flag.
setNoView
public void setNoView(boolean noView)
Set the noView flag.
noView
- The new noView flag.
setNoZoom
public void setNoZoom(boolean noZoom)
Set the noZoom flag.
noZoom
- The new noZoom flag.
setPrinted
public void setPrinted(boolean printed)
Set the printed flag.
printed
- The new printed flag.
setReadOnly
public void setReadOnly(boolean readOnly)
Set the readOnly flag.
readOnly
- The new readOnly flag.
setRectangle
public void setRectangle(PDRectangle rectangle)
This will set the rectangle for this annotation.
rectangle
- The new rectangle values.
setToggleNoView
public void setToggleNoView(boolean toggleNoView)
Set the toggleNoView flag.
toggleNoView
- The new toggleNoView flag.