Package-level declarations

Types

Link copied to clipboard
class PdfFile(pdfiumCore: PdfiumCore, pageFitPolicy: FitPolicy, viewSize: Size, originalUserPages: List<Int>?, isVertical: Boolean, spacingPx: Int, autoSpacing: Boolean, fitEachPage: Boolean, maxPageCacheSize: Int)

Manages PDF document and its pages.

Link copied to clipboard
class PDFView(context: Context?, attrs: AttributeSet?) : RelativeLayout

A view for displaying and interacting with PDF documents. It supports features like animation, zoom, caching, and swiping.

Link copied to clipboard
class RenderingHandler(looper: Looper, pdfView: PDFView) : Handler

A Handler that will process incoming RenderingTask messages and alert {@link PDFView.onBitmapRendered} when the portion of the PDF is ready to render.

Functions

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

Load PDF from a URI. Useful for content providers.

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

Load PDF using custom DocumentSource.

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

Load PDF from a file.

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.

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

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

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

Load PDF from the assets file.