public class Link extends NativeObject
Modifier and Type | Method and Description |
---|---|
static Link |
copy(Document targetDocument,
Link link)
Copy a link from an input document to a output document.
|
static Link |
createDynamicObject(long handle) |
QuadrilateralList |
getActiveArea()
The link area (Getter)
|
Rectangle |
getBoundingBox()
The location on the page (Getter)
|
boolean |
getHidden()
The link's visibility (Getter)
|
boolean |
getNoPrint()
The link's visibility when printing (Getter)
|
void |
setBorderStyle(Stroke value)
The link's border (Setter)
|
equals, hashCode
public static Link createDynamicObject(long handle)
public static Link copy(Document targetDocument, Link link) throws java.io.IOException, ConformanceException
targetDocument
- the output document with which the returned object is associatedlink
- the link to be copied to the targetDocument
targetDocument
java.lang.IllegalArgumentException
- if the targetDocument
is null
java.lang.IllegalArgumentException
- if the targetDocument
has already been closedjava.lang.IllegalArgumentException
- if the targetDocument
is read-onlyjava.lang.IllegalArgumentException
- if the link
is not associated with an input documentjava.lang.IllegalArgumentException
- if the link
argument is null
java.lang.IllegalArgumentException
- if the link
object or the associated input document has already been closedConformanceException
- 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 documentpublic QuadrilateralList getActiveArea() throws CorruptException
pdftoolbox.geometry.real.Quadrilateral
s.java.lang.IllegalStateException
- if the object has already been closedCorruptException
- if the PDF is corruptpublic Rectangle getBoundingBox() throws CorruptException
java.lang.IllegalStateException
- if the object has already been closedCorruptException
- if the PDF is corruptpublic boolean getHidden()
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.java.lang.IllegalStateException
- if the object has already been closedpublic boolean getNoPrint()
true
then the link is not present in a print output of the document.java.lang.IllegalStateException
- if the object has already been closedpublic void setBorderStyle(Stroke value) throws UnsupportedFeatureException
java.lang.IllegalStateException
- if the object has already been closedjava.lang.UnsupportedOperationException
- if the document is read-onlyjava.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object is associated with a different documentjava.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object has a pdftoolbox.pdf.content.Stroke.getDashPhase
differing from 0java.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object has a pdftoolbox.pdf.content.Stroke.getMiterLimit
differing from 10java.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object has a pdftoolbox.pdf.content.Stroke.getLineCapStyle
other than pdftoolbox.pdf.content.LineCapStyle.BUTT
java.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object has a pdftoolbox.pdf.content.Stroke.getLineJoinStyle
other than pdftoolbox.pdf.content.LineJoinStyle.MITER
java.lang.IllegalArgumentException
- the given pdftoolbox.pdf.content.Stroke
object's pdftoolbox.pdf.content.Stroke.getPaint
has a color space other than a device color space, or a calibrated color space.UnsupportedFeatureException
- the given pdftoolbox.pdf.content.Stroke
object's pdftoolbox.pdf.content.Stroke.getPaint
has a DeviceGray, DeviceCMYK, or CalGray color space.