Class CPDFLinkAnnotation

java.lang.Object
com.compdfkit.core.annotation.CPDFAnnotation
com.compdfkit.core.annotation.CPDFLinkAnnotation

public class CPDFLinkAnnotation extends CPDFAnnotation
A link annotation represents an action to be performed.
  • Method Details

    • setLinkAction

      public boolean setLinkAction(CPDFAction action)
      Sets the response action of the link annotation. There are multiple subtypes of the response action, and different response actions are determined according to CPDFAction.ActionType The 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

      public CPDFAction getLinkAction()
      Gets the response action of the link annotation. There are multiple subtypes of the response action, and different response actions are determined according to CPDFAction.ActionType The action type can be obtained throughCPDFAction.getActionType(), more: CPDFAction
      Returns:
      Returns the response action of the link annotation, more: CPDFAction
    • getDestination

      public CPDFDestination getDestination(CPDFDocument document)
      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

      public boolean setDestination(CPDFDocument document, CPDFDestination destination)
      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

      public boolean setRect(RectF rect)
      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:
      setRect in class CPDFAnnotation
      Parameters:
      rect - Rectangle on the page.
      Returns:
      Returns whether to successfully set annotation rectangle.
    • getRect

      public RectF 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:
      getRect in class CPDFAnnotation
      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:
      close in class CPDFAnnotation
    • 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.