| java.lang.Object | |
| ↳ | com.pspdfkit.annotations.stamps.CustomStampAppearanceStreamGenerator |
Collection of AppearanceStreamGenerator that can be registered via
addAppearanceStreamGenerator(AppearanceStreamGenerator)
to generate appearance streams for stamps with custom subjects.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| CustomStampAppearanceStreamGenerator() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addAppearanceStreamGenerator(String subject, AppearanceStreamGenerator appearanceStreamGenerator)
Adds new appearance stream generator for stamp annotations with given
subject. | ||||||||||
| DataProvider |
getDataProviderForAnnotation(Annotation annotation, EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
Called when the appearance stream data for the given annotation is needed.
| ||||||||||
| void |
removeAppearanceStreamGenerator(String subject)
Removes appearance stream generator for the given
subject that was previously registered via addAppearanceStreamGenerator(String, AppearanceStreamGenerator). | ||||||||||
| boolean |
shouldUseGeneratorForAnnotation(Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for
annotation. | ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pspdfkit.annotations.appearance.AppearanceStreamGenerator
| |||||||||||
Adds new appearance stream generator for stamp annotations with given subject.
This overrides previously registered appearance stream generator for the subject.
| subject | Subject of annotations that will use appearanceStreamGenerator to generate their AP stream. |
|---|---|
| appearanceStreamGenerator | Appearance stream generator for the specified subject.
|
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.
Removes appearance stream generator for the given subject that was previously registered via addAppearanceStreamGenerator(String, AppearanceStreamGenerator).
| subject | Previously registered subject. |
|---|
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. |
|---|