public class RichMediaAnnotation extends Object
Modifier and Type | Field and Description |
---|---|
protected PdfAnnotation |
annot
The annotation object
|
protected HashMap<String,PdfIndirectReference> |
assetsmap
a map with the assets (will be used to construct a name tree.)
|
protected PdfArray |
configurations
an array with configurations (will be added to the RichMediaContent).
|
protected PdfDictionary |
richMediaContent
the rich media content (can be reused for different annotations)
|
protected PdfIndirectReference |
richMediaContentReference
a reference to the RichMediaContent that can be reused.
|
protected PdfDictionary |
richMediaSettings
the rich media settings (specific for this annotation)
|
protected PdfArray |
views
an array of views (will be added to the RichMediaContent)
|
protected PdfWriter |
writer
The PdfWriter to which the annotation will be added.
|
Constructor and Description |
---|
RichMediaAnnotation(PdfWriter writer, Rectangle rect)
Creates a RichMediaAnnotation.
|
RichMediaAnnotation(PdfWriter writer, Rectangle rect, PdfIndirectReference richMediaContentReference)
Creates a RichMediaAnnotation using rich media content that has already been added to the writer.
|
Modifier and Type | Method and Description |
---|---|
PdfIndirectReference |
addAsset(String name, PdfFileSpecification fs)
Adds an embedded file.
|
PdfIndirectReference |
addAsset(String name, PdfIndirectReference ref)
Adds a reference to an embedded file.
|
PdfIndirectReference |
addConfiguration(PdfIndirectReference ref)
Adds a reference to a RichMediaConfiguration.
|
PdfIndirectReference |
addConfiguration(RichMediaConfiguration configuration)
Adds a RichMediaConfiguration.
|
PdfIndirectReference |
addView(PdfDictionary view)
Adds a view dictionary.
|
PdfIndirectReference |
addView(PdfIndirectReference ref)
Adds a reference to a view dictionary.
|
PdfAnnotation |
createAnnotation()
Creates the actual annotation and adds different elements to the PdfWriter while doing so.
|
PdfIndirectReference |
getRichMediaContentReference()
Gets a reference to the RichMediaContent for reuse of the rich media content.
|
void |
setActivation(RichMediaActivation richMediaActivation)
Sets the RichMediaActivation dictionary specifying the style of presentation, default script behavior, default view information, and animation style when the annotation is activated.
|
void |
setDeactivation(RichMediaDeactivation richMediaDeactivation)
Sets the RichMediaDeactivation dictionary specifying the condition that causes deactivation of the annotation.
|
protected PdfWriter writer
protected PdfAnnotation annot
protected PdfDictionary richMediaContent
protected PdfIndirectReference richMediaContentReference
protected PdfDictionary richMediaSettings
protected HashMap<String,PdfIndirectReference> assetsmap
protected PdfArray configurations
protected PdfArray views
public RichMediaAnnotation(PdfWriter writer, Rectangle rect)
writer
- the PdfWriter to which the annotation will be added.
rect
- the rectangle where the annotation will be added.
public RichMediaAnnotation(PdfWriter writer, Rectangle rect, PdfIndirectReference richMediaContentReference)
writer
- the PdfWriter to which the annotation will be added.
rect
- the rectangle where the annotation will be added.
richMediaContentReference
- reused rich media content.
public PdfIndirectReference getRichMediaContentReference()
public PdfIndirectReference addAsset(String name, PdfFileSpecification fs) throws IOException
name
- a name for the name tree
fs
- a file specification for an embedded file.
IOException
public PdfIndirectReference addAsset(String name, PdfIndirectReference ref) throws IOException
ref
- a reference to a PdfFileSpecification
IOException
public PdfIndirectReference addConfiguration(RichMediaConfiguration configuration) throws IOException
configuration
- a configuration dictionary
IOException
public PdfIndirectReference addConfiguration(PdfIndirectReference ref) throws IOException
ref
- a reference to a RichMediaConfiguration
IOException
public PdfIndirectReference addView(PdfDictionary view) throws IOException
view
- a view dictionary
IOException
public PdfIndirectReference addView(PdfIndirectReference ref) throws IOException
ref
- a reference to a view dictionary
IOException
public void setActivation(RichMediaActivation richMediaActivation)
richMediaActivation
-
public void setDeactivation(RichMediaDeactivation richMediaDeactivation)
richMediaDeactivation
-
public PdfAnnotation createAnnotation() throws IOException
IOException
Copyright © 1998–2019. All rights reserved.