importDocument

abstract fun importDocument(@NonNull context: Context, @NonNull documentSource: DocumentSource, @IntRange(from = 0) destinationIndex: Int): Single<List<EditingChange>>

Imports all the pages from a given document source to a destination index.

Scheduler:
importDocument(int, DocumentSource) does not operate by default on a particular Scheduler.

Return

Single emitting a list of all editing changes of every page for undo/redo operations. If a batch operation is in progress, the emitted list will be empty and the actual editing change is generated upon committing the batch.

Parameters

context

The context to use.

documentSource

Document source with the pages to import.

destinationIndex

Destination index where the pages will be imported.