openDocuments

open fun openDocuments(@NonNull context: Context, @NonNull @Size(min = 1) sources: List<DocumentSource>): PdfDocument

Opens multiple PDF document from a list of sources. The documents will be displayed as a single continuous document. Note that currently only local files are supported and passing remote or Uris will throw an java.io.IOException.

Note that this method blocks until the document is loaded and should not be invoked on main thread.

Return

PdfDocument instance if the opening succeeded.

Parameters

context

Application context.

sources

List of DocumentSources describing the sources and passwords of the documents.

Throws

If file was not opened correctly.

If no passwords or a wrong passwords were provided for opening the documents.

If PSPDFKit was not initialized with initialize call.


open fun openDocuments(@NonNull context: Context, @NonNull @Size(min = 1) sources: List<DocumentSource>, multithreadedRenderingEnabled: Boolean): PdfDocument

Opens multiple PDF document from a list of sources. The documents will be displayed as a single continuous document. Note that currently only local files are supported and passing remote or Uris will throw an java.io.IOException.

Note that this method blocks until the document is loaded and should not be invoked on main thread.

Return

PdfDocument instance if the opening succeeded.

Parameters

context

Application context.

sources

List of DocumentSources describing the sources and passwords of the documents.

multithreadedRenderingEnabled

Whether the multithreaded rendering should be enabled when rendering document pages.

Throws

If file was not opened correctly.

If no passwords or a wrong passwords were provided for opening the documents.

If PSPDFKit was not initialized with initialize call.