load

inline fun PDFView.load(source: DocumentSource, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF using custom DocumentSource.

Parameters

source

The {@link DocumentSource} to use for loading the PDF document.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also


inline fun PDFView.load(assetName: String, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF from the assets file.

Parameters

assetName

The name of the asset file containing the PDF document.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also


inline fun PDFView.load(file: File, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF from a file.

Parameters

file

The {@link File} containing the PDF document.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also


inline fun PDFView.load(uri: Uri, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF from a URI. Useful for content providers.

Parameters

uri

The {@link Uri} pointing to the PDF document.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also


inline fun PDFView.load(bytes: ByteArray, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF from a byte array. Document is not saved on disk.

Parameters

bytes

The byte array containing the PDF document content.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also


inline fun PDFView.load(stream: InputStream, builder: PdfRequest.Builder.() -> Unit = {})

Load PDF from an {@link InputStream}. The stream is converted to a byte array, since native code does not support direct stream handling.

Parameters

stream

The {@link InputStream} containing the PDF document content.

builder

A lambda function to configure the PDF request using a {@link PdfRequest.Builder} instance.

See also