Class Link

    • Method Detail

      • copy

        public static Link copy​(Document targetDocument,
                                Link link)
                         throws java.io.IOException,
                                ConformanceException

        Copy a link from an input document to a output document.

        Parameters:
        targetDocument - the output document with which the returned object is associated
        link - the link to be copied to the targetDocument
        Returns:
        the copied link, associated with the targetDocument
        Throws:
        java.lang.IllegalArgumentException - if the targetDocument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument is read-only
        java.lang.IllegalArgumentException - if the link is not associated with an input document
        java.lang.IllegalArgumentException - if the document associated with the link object has already been closed
        ConformanceException - The conformance level of the input document is not compatible with the conformance level of the targetDocument.
        java.io.IOException - Error reading from the input document or writing to the output document
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if link is null
      • getBoundingBox

        public Rectangle getBoundingBox()
                                 throws CorruptException

        The location on the page (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        CorruptException - if the PDF is corrupt
      • getHidden

        public boolean getHidden()

        The link's visibility (Getter)

        If true then the link is present, but is invisible and not available for user interaction. Depending on the getNoPrint() property it will, however, still be visible when printing.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • getNoPrint

        public boolean getNoPrint()

        The link's visibility when printing (Getter)

        If true then the link is not present in a print output of the document.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • getContent

        public java.lang.String getContent()

        The content (Getter)

        A text that shall be displayed for the link or, if this kind of link does not display text, an alternate description of the link's contents in human-readable form.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • getName

        public java.lang.String getName()

        The link name (Getter)

        A text string uniquely identifying it among all the annotations on its page.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed