org.pdfbox.pdmodel.interactive.annotation
Class PDAppearanceDictionary
java.lang.Object
org.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary
- COSObjectable
public class PDAppearanceDictionary
extends java.lang.Object
This class represents a PDF /AP entry the appearance dictionary.
PDAppearanceDictionary
public PDAppearanceDictionary()
Constructor.
PDAppearanceDictionary
public PDAppearanceDictionary(COSDictionary dict)
Constructor.
dict
- The annotations dictionary.
getDictionary
public COSDictionary getDictionary()
returns the dictionary.
getDownAppearance
public Map getDownAppearance()
This will return a list of appearances. In the case where there is
only one appearance the map will contain one entry whose key is the string
"default". If there is no rollover appearance then the normal appearance
will be returned. Which means that this method will never return null.
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
getNormalAppearance
public Map getNormalAppearance()
This will return a list of appearances. In the case where there is
only one appearance the map will contain one entry whose key is the string
"default".
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
getRolloverAppearance
public Map getRolloverAppearance()
This will return a list of appearances. In the case where there is
only one appearance the map will contain one entry whose key is the string
"default". If there is no rollover appearance then the normal appearance
will be returned. Which means that this method will never return null.
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
setDownAppearance
public void setDownAppearance(Map appearanceMap)
This will set a list of appearances. If you would like to set the single
appearance then you should use the key "default", and when the PDF is written
back to the filesystem then there will only be one stream.
appearanceMap
- The updated map with the appearance.
setNormalAppearance
public void setNormalAppearance(Map appearanceMap)
This will set a list of appearances. If you would like to set the single
appearance then you should use the key "default", and when the PDF is written
back to the filesystem then there will only be one stream.
appearanceMap
- The updated map with the appearance.
setNormalAppearance
public void setNormalAppearance(PDAppearanceStream ap)
This will set the normal appearance when there is only one appearance
to be shown.
ap
- The appearance stream to show.
setRolloverAppearance
public void setRolloverAppearance(Map appearanceMap)
This will set a list of appearances. If you would like to set the single
appearance then you should use the key "default", and when the PDF is written
back to the filesystem then there will only be one stream.
appearanceMap
- The updated map with the appearance.