public class Annotation extends NativeObject
Modifier and Type | Method and Description |
---|---|
static Annotation |
copy(Document targetDocument,
Annotation annotation)
Copy an annotation
|
static Annotation |
createDynamicObject(long handle) |
Rectangle |
getBoundingBox()
The location on the page (Getter)
|
boolean |
getHidden()
The annotation's visibility (Getter)
|
boolean |
getNoPrint()
The annotation's visibility when printing (Getter)
|
boolean |
getNoRotate()
The annotation's rotation behavior (Getter)
|
boolean |
getNoZoom()
The annotation's scaling behavior (Getter)
|
equals, hashCode
public static Annotation createDynamicObject(long handle)
public static Annotation copy(Document targetDocument, Annotation annotation) throws java.io.IOException, ConformanceException
targetDocument
.
The returned object is associated with the given target document but not yet part of it.targetDocument
- the output document with which the returned object is associatedannotation
- the annotation 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 annotation
is not associated with an input documentjava.lang.IllegalArgumentException
- if the annotation
argument is null
java.lang.IllegalArgumentException
- if the annotation
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 Rectangle getBoundingBox() throws CorruptException
java.lang.IllegalStateException
- if the object has already been closedCorruptException
- if the PDF is corruptpublic boolean getHidden()
true
then the annotation 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 annotation is not present in a print output of the document.java.lang.IllegalStateException
- if the object has already been closedpublic boolean getNoZoom()
true
then the annotation's visual appearance does not scale with the zoom factor of a PDF viewer.java.lang.IllegalStateException
- if the object has already been closedpublic boolean getNoRotate()
true
then the annotation's visual appearance does not rotate with the rotation set in a PDF viewer.java.lang.IllegalStateException
- if the object has already been closed