Class PDAppearanceDictionary
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceDictionary
- All Implemented Interfaces:
COSObjectable
An appearance dictionary specifying how the annotation shall be presented visually on the page.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for embedding.PDAppearanceDictionary
(COSDictionary dictionary) Constructor for reading. -
Method Summary
Modifier and TypeMethodDescriptionConvert this standard java object to a COS object.This will return a list of appearances.This will return a list of appearances.This will return a list of appearances.void
This will set a list of appearances.void
This will set the down appearance when there is down appearance to be shown.void
This will set a list of appearances.void
This will set the normal appearance when there is only one appearance to be shown.void
This will set a list of appearances.void
This will set the rollover appearance when there is rollover appearance to be shown.
-
Field Details
-
dictionary
-
-
Constructor Details
-
PDAppearanceDictionary
public PDAppearanceDictionary()Constructor for embedding. -
PDAppearanceDictionary
Constructor for reading.- Parameters:
dictionary
- The annotations dictionary.
-
-
Method Details
-
getCOSObject
Description copied from interface:COSObjectable
Convert this standard java object to a COS object.- Specified by:
getCOSObject
in interfaceCOSObjectable
- Returns:
- The cos object that matches this Java object.
-
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".- Returns:
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
-
setNormalAppearance
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.- Parameters:
entry
- appearance stream or subdictionary
-
setNormalAppearance
This will set the normal appearance when there is only one appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-
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.- Returns:
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
-
setRolloverAppearance
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.- Parameters:
entry
- appearance stream or subdictionary
-
setRolloverAppearance
This will set the rollover appearance when there is rollover appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-
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.- Returns:
- A list of key(java.lang.String) value(PDAppearanceStream) pairs
-
setDownAppearance
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.- Parameters:
entry
- appearance stream or subdictionary
-
setDownAppearance
This will set the down appearance when there is down appearance to be shown.- Parameters:
ap
- The appearance stream to show.
-