public class

AssetAppearanceStreamGenerator

extends Object
implements Parcelable AppearanceStreamGenerator
java.lang.Object
   ↳ com.pspdfkit.annotations.appearance.AssetAppearanceStreamGenerator

Class Overview

Annotation appearance stream generator that supplies a PDF file in app assets to be used as annotation appearance stream.

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Fields
public static final Creator<AssetAppearanceStreamGenerator> CREATOR
Public Constructors
AssetAppearanceStreamGenerator(String assetName)
Default constructor taking the assetName of an AP stream source document.
Protected Constructors
AssetAppearanceStreamGenerator(Parcel in)
Public Methods
int describeContents()
boolean equals(Object o)
DataProvider getDataProviderForAnnotation(Annotation annotation, EnumSet<AppearanceStreamGenerator.AppearanceStreamGenerationOptions> options)
Called when the appearance stream data for the given annotation is needed.
int hashCode()
boolean shouldUseGeneratorForAnnotation(Annotation annotation)
Asks the generator whether it should be used to generate the appearance stream for annotation.
void writeToParcel(Parcel dest, int flags)
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable
From interface com.pspdfkit.annotations.appearance.AppearanceStreamGenerator

Fields

public static final Creator<AssetAppearanceStreamGenerator> CREATOR

Public Constructors

public AssetAppearanceStreamGenerator (String assetName)

Default constructor taking the assetName of an AP stream source document. The filename/path needs to be relative to the asset directory.

Parameters
assetName Filename of the asset in the application assets folder.

Protected Constructors

protected AssetAppearanceStreamGenerator (Parcel in)

Public Methods

public int describeContents ()

public boolean equals (Object o)

public DataProvider getDataProviderForAnnotation (Annotation annotation, 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.

public int hashCode ()

public boolean shouldUseGeneratorForAnnotation (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.

public void writeToParcel (Parcel dest, int flags)