Package com.compdfkit.core.annotation
Class CPDFLinkAnnotation
java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFLinkAnnotation
A link annotation represents an action to be performed.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.compdfkit.core.annotation.CPDFAnnotation
CPDFAnnotation.AppearanceType, CPDFAnnotation.Flags, CPDFAnnotation.PSOAnnotationState, CPDFAnnotation.Type -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()When the object is no longer in use, call this method to release resources.getDestination(CPDFDocument document) Gets link information of document.Gets the response action of the link annotation.getRect()Gets annotation rectangle.booleansetDestination(CPDFDocument document, CPDFDestination destination) Sets link information of document.booleansetLinkAction(CPDFAction action) Sets the response action of the link annotation.booleanSets annotation rectangle.booleanupdateAp()Updates annotation appearance.Methods inherited from class com.compdfkit.core.annotation.CPDFAnnotation
addToPage, createReplyAnnotation, createReplyStateAnnotation, getContent, getCreationDate, getFlags, getMainAnnotNM, getName, getRecentlyModifyDate, getReplies, getState, getTitle, getType, hasAp, isAllowCorrectAnnotationAp, isExitMainAnnot, isHidden, isLocked, isMarkedStateAnnot, isReplyAnnot, isReviewStateAnnot, isValid, removeFromPage, removeFromPageIncludeReplyAnnot, setAllowCorrectAnnotationAp, setContent, setCreationDate, setFlags, setHidden, setLocked, setMarkedAnnotState, setName, setRecentlyModifyDate, setReviewAnnotState, setState, setTitle
-
Method Details
-
setLinkAction
Sets the response action of the link annotation. There are multiple subtypes of the response action, and different response actions are determined according toCPDFAction.ActionTypeThe action type can be obtained throughCPDFAction.getActionType(), more:CPDFAction- Parameters:
action- Response action of the link annotation.- Returns:
- Returns whether to successfully set the response action of the link annotation.
-
getLinkAction
Gets the response action of the link annotation. There are multiple subtypes of the response action, and different response actions are determined according toCPDFAction.ActionTypeThe action type can be obtained throughCPDFAction.getActionType(), more:CPDFAction- Returns:
- Returns the response action of the link annotation, more:
CPDFAction
-
getDestination
Gets link information of document.- Parameters:
document- This class is about CPDFDocument, one CPDFDocument class for one document.- Returns:
- Returns link information of document.
- See Also:
-
setDestination
Sets link information of document.- Parameters:
document- This class is about CPDFDocument, one CPDFDocument class for one document.destination- destination information.- Returns:
- Whether to successfully set link information of document.
-
setRect
Sets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.- Overrides:
setRectin classCPDFAnnotation- Parameters:
rect- Rectangle on the page.- Returns:
- Returns whether to successfully set annotation rectangle.
-
getRect
Gets annotation rectangle. The page coordinate system has its origin at the left-bottom corner of the page, with the X-axis on the bottom going to the right, and the Y-axis on the left side going up. The device coordinate system is device dependent. For screen device, its origin is at the left-top corner of the window.- Overrides:
getRectin classCPDFAnnotation- Returns:
- Returns rectangle on the page.
-
close
public void close()When the object is no longer in use, call this method to release resources.- Overrides:
closein classCPDFAnnotation
-
updateAp
public boolean updateAp()Updates annotation appearance. Call this function to update annotation appearance after modifying annotation attribute.- Returns:
- Returns whether to successfully update annotation appearance.
-