public interface

EmbeddedFilesProvider

com.pspdfkit.document.files.EmbeddedFilesProvider

Class Overview

Handles all embedded files related operations on the owning document. Retrieve it with getEmbeddedFilesProvider().

Summary

Public Methods
abstract Maybe<EmbeddedFile> getEmbeddedFileWithFileNameAsync(String fileName, boolean includeFileAnnotations)
Returns embedded file with file name if it exists, asynchronously.
abstract Maybe<EmbeddedFile> getEmbeddedFileWithIdAsync(String id, boolean includeFileAnnotations)
Returns embedded file with given identifier if it exists, asynchronously.
abstract List<EmbeddedFile> getEmbeddedFiles(boolean includeFileAnnotations)
Returns the list of embedded files in the document.
abstract Single<List<EmbeddedFile>> getEmbeddedFilesAsync(boolean includeFileAnnotations)
Returns the list of embedded files in the document, async.

Public Methods

public abstract Maybe<EmbeddedFile> getEmbeddedFileWithFileNameAsync (String fileName, boolean includeFileAnnotations)

Returns embedded file with file name if it exists, asynchronously.

Parameters
fileName Name of the embedded file to search for.
includeFileAnnotations true to include files embedded in FileAnnotation.
Returns
  • An instance of Maybe that either emits the requested file in `onSuccess()` or terminates with `onCompleted()` or `onError()`.

public abstract Maybe<EmbeddedFile> getEmbeddedFileWithIdAsync (String id, boolean includeFileAnnotations)

Returns embedded file with given identifier if it exists, asynchronously.

Parameters
id Id of the embedded file to search for.
includeFileAnnotations true to include files embedded in FileAnnotation.
Returns
  • An instance of Maybe that either emits the requested file in `onSuccess()` or terminates with `onCompleted()` or `onError()`.

public abstract List<EmbeddedFile> getEmbeddedFiles (boolean includeFileAnnotations)

Returns the list of embedded files in the document.

Note: this call may block for a while and should not be called on the main thread.

Parameters
includeFileAnnotations true to include files embedded in FileAnnotation.
Returns
  • List of embedded files or empty list if this document contains no embedded files.

public abstract Single<List<EmbeddedFile>> getEmbeddedFilesAsync (boolean includeFileAnnotations)

Returns the list of embedded files in the document, async.

Parameters
includeFileAnnotations true to include files embedded in FileAnnotation.
Returns
  • Single emitting list of all embedded files in the document.