| com.pspdfkit.annotations.appearance.AppearanceStreamGenerator |
Known Indirect Subclasses
|
Interface for custom annotation appearance stream generators.
Instances can be set on Annotation via setAppearanceStreamGenerator(AppearanceStreamGenerator)
to replace default PSPDFKit provided appearance stream.
The annotation will use the first page of the PDF opened from DataProvider returned by getDataProviderForAnnotation(Annotation, EnumSet)
as its appearance and this content will be embedded into the PDF.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | AppearanceStreamGenerator.AppearanceStreamGenerationOptions | Options for appearance stream generation. | |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract DataProvider |
getDataProviderForAnnotation(Annotation annotation, EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
Called when the appearance stream data for the given annotation is needed.
| ||||||||||
| abstract boolean |
shouldUseGeneratorForAnnotation(Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for
annotation. | ||||||||||
Called when the appearance stream data for the given annotation is needed.
The data represented by the DataProvider must be a validly formed PDF.
The contents of the first page of that PDF file will be embedded in the annotation as its appearance stream.
| annotation | Annotation for which the AP stream is being generated. |
|---|---|
| options | Enum set of AP stream generation options. |
DataProvider representing a validly formed PDF or null to use annotation's default AP stream.
Asks the generator whether it should be used to generate the appearance stream for annotation.
| annotation | Annotation for which the AP stream is being generated. |
|---|