Package org.openpdf.renderer.annotation
Class PDFAnnotation
java.lang.Object
org.openpdf.renderer.annotation.PDFAnnotation
- Direct Known Subclasses:
LinkAnnotation,MarkupAnnotation,WidgetAnnotation
Encapsulate a PDF annotation. This is only the super-class of PDF annotations,
which has an "unknown" annotation type.
Use the createAnnotation() method for getting an annotation of the correct
type (if implemented).
- Since:
- 03.07.2009
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringprivate Stringprivate final Stringprivate Integerstatic final StringDefinition of some annotation sub-typesstatic final Stringstatic final Stringprivate Stringprivate final PDFObjectprivate final Rectangle2D.Floatprivate final Stringprivate final AnnotationTypestatic final String -
Constructor Summary
ConstructorsConstructorDescriptionPDFAnnotation(PDFObject annotObject) ConstructorPDFAnnotation(PDFObject annotObject, AnnotationType type) Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic PDFAnnotationcreateAnnotation(PDFObject parent) Create a new PDF annotation object.getFlags()Get list of pdf commands for this annotationGet the PDF Object which contains the annotation valuesgetRect()Get the rectangle on which the annotation should be applied toprotected AffineTransformgetType()Get the annotation typebooleanisFlagSet(PDFAnnotation.Flags flag) Get a Rectangle2D.Float representation for a PDFObject that is an array of four Numbers.toString()
-
Field Details
-
GOTO
Definition of some annotation sub-types- See Also:
-
GOTOE
- See Also:
-
GOTOR
- See Also:
-
URI
- See Also:
-
pdfObj
-
type
-
rect
-
subType
-
contents
-
annotationName
-
modified
-
flags
-
appearanceState
-
-
Constructor Details
-
PDFAnnotation
Constructor- Parameters:
annotObject- - the PDFObject which contains the annotation description- Throws:
IOException
-
PDFAnnotation
Constructor- Parameters:
annotObject- - the PDFObject which contains the annotation description- Throws:
IOException
-
-
Method Details
-
createAnnotation
Create a new PDF annotation object. Currently supported annotation types:- Link annotation
- Parameters:
parent-- Returns:
- PDFAnnotation
- Throws:
IOException
-
parseRect
Get a Rectangle2D.Float representation for a PDFObject that is an array of four Numbers.- Parameters:
obj- a PDFObject that represents an Array of exactly four Numbers.- Throws:
IOException
-
getPdfObj
Get the PDF Object which contains the annotation values- Returns:
- PDFObject
-
getType
Get the annotation type- Returns:
- int
-
getRect
Get the rectangle on which the annotation should be applied to- Returns:
- Rectangle2D.Float
-
getSubType
-
getAnnotationName
-
getAppearanceState
-
getContents
-
getFlags
-
isFlagSet
-
getModified
-
toString
-
getPageCommandsForAnnotation
Get list of pdf commands for this annotation- Returns:
-
getScalingTransformation
-