public abstract class

AssetAnnotation

extends LinkAnnotation
java.lang.Object
   ↳ com.pspdfkit.annotations.Annotation
     ↳ com.pspdfkit.annotations.LinkAnnotation
       ↳ com.pspdfkit.annotations.AssetAnnotation
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Abstract subclass that contains an asset from a link.

Summary

[Expand]
Inherited Constants
From class com.pspdfkit.annotations.Annotation
[Expand]
Inherited Fields
From class com.pspdfkit.annotations.Annotation
Public Methods
String getAssetName()
Returns the name of the asset to which this annotation is pointing to, or empty string.
Uri getFileUri(Context context, PdfDocument pdfDocument)
Extracts asset into a file and returns the file Uri.
[Expand]
Inherited Methods
From class com.pspdfkit.annotations.LinkAnnotation
From class com.pspdfkit.annotations.Annotation
From class java.lang.Object

Public Methods

public String getAssetName ()

Returns the name of the asset to which this annotation is pointing to, or empty string.

Returns
  • Name of the asset.

public Uri getFileUri (Context context, 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.