Package com.itextpdf.kernel.pdf.annot
Class Pdf3DAnnotation
- java.lang.Object
-
- com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
-
- com.itextpdf.kernel.pdf.annot.PdfAnnotation
-
- com.itextpdf.kernel.pdf.annot.Pdf3DAnnotation
-
public class Pdf3DAnnotation extends PdfAnnotation
This class represents 3D annotations by which 3D artwork shall be represented in a PDF document. See also ISO-32000-2 13.6.2 "3D annotations".
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
PdfAnnotation.PdfUnknownAnnotation
-
-
Field Summary
-
Fields inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
Accepted, Canceled, Completed, HIDDEN, HIGHLIGHT_INVERT, HIGHLIGHT_NONE, HIGHLIGHT_OUTLINE, HIGHLIGHT_PUSH, HIGHLIGHT_TOGGLE, INVISIBLE, LOCKED, LOCKED_CONTENTS, Marked, MarkedModel, NO_ROTATE, NO_VIEW, NO_ZOOM, None, page, PRINT, READ_ONLY, Rejected, ReviewModel, STYLE_BEVELED, STYLE_DASHED, STYLE_INSET, STYLE_SOLID, STYLE_UNDERLINE, TOGGLE_NO_VIEW, Unmarked
-
-
Constructor Summary
Constructors Constructor Description Pdf3DAnnotation(Rectangle rect, PdfObject artwork)
Creates aPdf3DAnnotation
instance.Pdf3DAnnotation(PdfDictionary pdfObject)
Instantiates a newPdf3DAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PdfDictionary
getActivationDictionary()
Gets the activation dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.PdfObject
getDefaultInitialView()
Gets the default initial view of the 3D artwork that shall be used when the annotation is activated.PdfName
getSubtype()
Gets aPdfName
which value is a subtype of this annotation.Rectangle
getViewBox()
Gets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.PdfBoolean
isInteractive()
Indicates whether the 3D annotation is intended to be interactive or not.Pdf3DAnnotation
setActivationDictionary(PdfDictionary activationDictionary)
Sets the activation dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.Pdf3DAnnotation
setDefaultInitialView(PdfObject initialView)
Sets the default initial view of the 3D artwork that shall be used when the annotation is activated.Pdf3DAnnotation
setInteractive(boolean interactive)
Sets the primary use of the 3D annotation.Pdf3DAnnotation
setViewBox(Rectangle viewBox)
Sets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.-
Methods inherited from class com.itextpdf.kernel.pdf.annot.PdfAnnotation
addAssociatedFile, flush, getAppearanceDictionary, getAppearanceObject, getAppearanceState, getAssociatedFiles, getBlendMode, getBorder, getColorObject, getContents, getDate, getDownAppearanceObject, getFlags, getLang, getName, getNonStrokingOpacity, getNormalAppearanceObject, getPage, getPageObject, getRectangle, getRolloverAppearanceObject, getStrokingOpacity, getStructParentIndex, getTitle, hasFlag, isWrappedObjectMustBeIndirect, makeAnnotation, put, remove, resetFlag, setAppearance, setAppearance, setAppearanceState, setBlendMode, setBorder, setBorder, setColor, setColor, setColor, setContents, setContents, setDate, setDownAppearance, setDownAppearance, setFlag, setFlags, setLang, setLayer, setName, setNonStrokingOpacity, setNormalAppearance, setNormalAppearance, setPage, setRectangle, setRolloverAppearance, setRolloverAppearance, setStrokingOpacity, setStructParentIndex, setTitle
-
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
-
-
-
Constructor Detail
-
Pdf3DAnnotation
public Pdf3DAnnotation(Rectangle rect, PdfObject artwork)
Creates aPdf3DAnnotation
instance.- Parameters:
rect
- the annotation rectangle, defining the location of the annotation on the page in default user space units. SeePdfAnnotation.setRectangle(PdfArray)
.artwork
- 3D artwork which is represented by the annotation
-
Pdf3DAnnotation
public Pdf3DAnnotation(PdfDictionary pdfObject)
Instantiates a newPdf3DAnnotation
instance based onPdfDictionary
instance, that represents existing annotation object in the document.- Parameters:
pdfObject
- thePdfDictionary
representing annotation object- See Also:
PdfAnnotation.makeAnnotation(PdfObject)
-
-
Method Detail
-
getSubtype
public PdfName getSubtype()
Gets aPdfName
which value is a subtype of this annotation. See ISO-320001 12.5.6, "Annotation Types" for the reference to the possible types.- Specified by:
getSubtype
in classPdfAnnotation
- Returns:
- subtype of this annotation.
-
setDefaultInitialView
public Pdf3DAnnotation setDefaultInitialView(PdfObject initialView)
Sets the default initial view of the 3D artwork that shall be used when the annotation is activated.- Parameters:
initialView
- the default initial view of the 3D artwork that shall be used when the annotation is activated- Returns:
- this
Pdf3DAnnotation
instance
-
getDefaultInitialView
public PdfObject getDefaultInitialView()
Gets the default initial view of the 3D artwork that shall be used when the annotation is activated.- Returns:
- the default initial view of the 3D artwork that shall be used when the annotation is activated
-
setActivationDictionary
public Pdf3DAnnotation setActivationDictionary(PdfDictionary activationDictionary)
Sets the activation dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.- Parameters:
activationDictionary
- dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.- Returns:
- this
Pdf3DAnnotation
instance
-
getActivationDictionary
public PdfDictionary getActivationDictionary()
Gets the activation dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.- Returns:
- the activation dictionary that defines the times at which the annotation shall be activated and deactivated and the state of the 3D artwork instance at those times.
-
setInteractive
public Pdf3DAnnotation setInteractive(boolean interactive)
Sets the primary use of the 3D annotation.If true, it is intended to be interactive; if false, it is intended to be manipulated programmatically, as with an ECMAScript animation. Interactive PDF processors may present different user interface controls for interactive 3D annotations (for example, to rotate, pan, or zoom the artwork) than for those managed by a script or other mechanism.
Default value: true.
- Parameters:
interactive
- if true, it is intended to be interactive; if false, it is intended to be manipulated programmatically- Returns:
- this
Pdf3DAnnotation
instance
-
isInteractive
public PdfBoolean isInteractive()
Indicates whether the 3D annotation is intended to be interactive or not.- Returns:
- whether the 3D annotation is intended to be interactive or not
-
setViewBox
public Pdf3DAnnotation setViewBox(Rectangle viewBox)
Sets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn. It shall be within the rectangle specified by the annotation’s Rect entry and shall be expressed in the annotation’s target coordinate system.Default value: the annotation’s Rect entry, expressed in the target coordinate system. This value is [-w/2 -h/2 w/2 h/2], where w and h are the width and height, respectively, of Rect.
- Parameters:
viewBox
- the rectangular area in which the 3D artwork shall be drawn- Returns:
- this
Pdf3DAnnotation
instance
-
getViewBox
public Rectangle getViewBox()
Gets the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.- Returns:
- the 3D view box, which is the rectangular area in which the 3D artwork shall be drawn.
-
-