Class ContentResolverAppearanceStreamGenerator
-
- All Implemented Interfaces:
-
android.os.Parcelable
,com.pspdfkit.annotations.appearance.AppearanceStreamGenerator
public class ContentResolverAppearanceStreamGenerator implements AppearanceStreamGenerator, Parcelable
Annotation appearance stream generator that supplies a PDF file from a ContentProvider to be used as annotation appearance stream.
-
-
Field Summary
Fields Modifier and Type Field Description public final static Parcelable.Creator<ContentResolverAppearanceStreamGenerator>
CREATOR
-
Constructor Summary
Constructors Constructor Description ContentResolverAppearanceStreamGenerator(Uri uri)
Creates the appearance stream generator serving document at uri
as an appearance stream.
-
Method Summary
Modifier and Type Method Description DataProvider
getDataProviderForAnnotation(@NonNull() Annotation annotation, @NonNull() EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
Called when the appearance stream data for the given annotation is needed. boolean
shouldUseGeneratorForAnnotation(@NonNull() Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for annotation
.int
describeContents()
void
writeToParcel(Parcel dest, int flags)
int
hashCode()
boolean
equals(Object o)
-
-
Method Detail
-
getDataProviderForAnnotation
@Nullable() DataProvider getDataProviderForAnnotation(@NonNull() Annotation annotation, @NonNull() EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
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.- Parameters:
annotation
- Annotation for which the AP stream is being generated.options
- Enum set of AP stream generation options.- Returns:
DataProvider representing a validly formed PDF or
null
to use annotation's default AP stream.
-
shouldUseGeneratorForAnnotation
boolean shouldUseGeneratorForAnnotation(@NonNull() Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for
annotation
.- Parameters:
annotation
- Annotation for which the AP stream is being generated.
-
describeContents
int describeContents()
-
writeToParcel
void writeToParcel(Parcel dest, int flags)
-
hashCode
int hashCode()
-
-
-
-