Package com.pspdfkit.annotations
Class AssetAnnotation
-
- All Implemented Interfaces:
public abstract class AssetAnnotation extends LinkAnnotation
Abstract subclass that contains an asset from a link.
-
-
Method Summary
Modifier and Type Method Description String
getAssetName()
Returns the name of the asset to which this annotation is pointing to, or empty string. Uri
getFileUri(@NonNull() Context context, @NonNull() PdfDocument pdfDocument)
Extracts asset into a file and returns the file Uri. -
-
Method Detail
-
getAssetName
@Nullable() String getAssetName()
Returns the name of the asset to which this annotation is pointing to, or empty string.
- Returns:
Name of the asset.
-
getFileUri
@NonNull() Uri getFileUri(@NonNull() Context context, @NonNull() PdfDocument pdfDocument)
Extracts asset into a file and returns the file Uri. It's recommended that you perform this action asynchronously. Also, once the temporary file is extracted, you are required to perform the cleanup.
- Parameters:
context
- Context of the calling component, used to access the filesystem.pdfDocument
- Document containing the asset.
-
-
-
-