Home » pdfbox-1.1.0-src » org.apache.pdfbox.pdmodel.interactive.annotation » [javadoc | source]
org.apache.pdfbox.pdmodel.interactive.annotation
abstract public class: PDAnnotation [javadoc | source]
java.lang.Object
   org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation

All Implemented Interfaces:
    COSObjectable

Direct Known Subclasses:
    PDAnnotationFileAttachment, PDAnnotationTextMarkup, PDAnnotationPopup, PDAnnotationRubberStamp, PDAnnotationMarkup, PDAnnotationUnknown, PDAnnotationSquareCircle, PDAnnotationWidget, PDAnnotationLink, PDAnnotationLine, PDAnnotationText

This class represents a PDF annotation.
Field Summary
public static final  int FLAG_INVISIBLE    An annotation flag. 
public static final  int FLAG_HIDDEN    An annotation flag. 
public static final  int FLAG_PRINTED    An annotation flag. 
public static final  int FLAG_NO_ZOOM    An annotation flag. 
public static final  int FLAG_NO_ROTATE    An annotation flag. 
public static final  int FLAG_NO_VIEW    An annotation flag. 
public static final  int FLAG_READ_ONLY    An annotation flag. 
public static final  int FLAG_LOCKED    An annotation flag. 
public static final  int FLAG_TOGGLE_NO_VIEW    An annotation flag. 
Constructor:
 public PDAnnotation() 
 public PDAnnotation(COSDictionary dict) 
    Constructor.
    Parameters:
    dict - The annotations dictionary.
Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation Summary:
createAnnotation,   getAnnotationFlags,   getAnnotationName,   getAppearance,   getAppearanceStream,   getCOSObject,   getColour,   getContents,   getDictionary,   getModifiedDate,   getPage,   getRectangle,   getSubtype,   isHidden,   isInvisible,   isLocked,   isNoRotate,   isNoView,   isNoZoom,   isPrinted,   isReadOnly,   isToggleNoView,   setAnnotationFlags,   setAnnotationName,   setAppearance,   setAppearanceStream,   setColour,   setContents,   setHidden,   setInvisible,   setLocked,   setModifiedDate,   setNoRotate,   setNoView,   setNoZoom,   setPrinted,   setReadOnly,   setRectangle,   setToggleNoView
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.pdfbox.pdmodel.interactive.annotation.PDAnnotation Detail:
 public static PDAnnotation createAnnotation(COSBase base) throws IOException 
    Create the correct annotation from the base COS object.
 public int getAnnotationFlags() 
    This will get the flags for this field.
 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.
 public PDAppearanceDictionary getAppearance() 
    This will get the appearance dictionary associated with this annotation. This may return null.
 public String getAppearanceStream() 
    This will get the name of the current appearance stream if any.
 public COSBase getCOSObject() 
    Interface method for COSObjectable.
 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
 public String getContents() 
    Get the "contents" of the field.
 public COSDictionary getDictionary() 
    returns the dictionary.
 public String getModifiedDate() 
    This will retrieve the date and time the annotation was modified.
 public PDPage getPage() 
    This will retrieve the corresponding page of this annotation.
 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.
 public String getSubtype() 
    This will retrieve the subtype of the annotation.
 public boolean isHidden() 
    Get the hidden flag.
 public boolean isInvisible() 
    Get the invisible flag.
 public boolean isLocked() 
    Get the locked flag.
 public boolean isNoRotate() 
    Get the noRotate flag.
 public boolean isNoView() 
    Get the noView flag.
 public boolean isNoZoom() 
    Get the noZoom flag.
 public boolean isPrinted() 
    Get the printed flag.
 public boolean isReadOnly() 
    Get the readOnly flag.
 public boolean isToggleNoView() 
    Get the toggleNoView flag.
 public  void setAnnotationFlags(int flags) 
    This will set the flags for this field.
 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.
 public  void setAppearance(PDAppearanceDictionary appearance) 
    This will set the appearance associated with this annotation.
 public  void setAppearanceStream(String as) 
    This will set the annotations appearance stream name.
 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
 public  void setContents(String value) 
    Set the "contents" of the field.
 public  void setHidden(boolean hidden) 
    Set the hidden flag.
 public  void setInvisible(boolean invisible) 
    Set the invisible flag.
 public  void setLocked(boolean locked) 
    Set the locked flag.
 public  void setModifiedDate(String m) 
    This will set the the date and time the annotation was modified.
 public  void setNoRotate(boolean noRotate) 
    Set the noRotate flag.
 public  void setNoView(boolean noView) 
    Set the noView flag.
 public  void setNoZoom(boolean noZoom) 
    Set the noZoom flag.
 public  void setPrinted(boolean printed) 
    Set the printed flag.
 public  void setReadOnly(boolean readOnly) 
    Set the readOnly flag.
 public  void setRectangle(PDRectangle rectangle) 
    This will set the rectangle for this annotation.
 public  void setToggleNoView(boolean toggleNoView) 
    Set the toggleNoView flag.