Companion

object Companion

Properties

Link copied to clipboard

The default of imageCacheBudgetBytes: 32 MB, a small share of a 192 MB Android heap.

Functions

Link copied to clipboard
fun open(bytes: ByteArray, password: ByteArray = byteArrayOf(), allowInvalidPassword: Boolean = false): PdfDocument

fun open(bytes: ByteArray, password: String, allowInvalidPassword: Boolean = false): PdfDocument

open with a String password.

Link copied to clipboard
fun PdfDocument.Companion.openFile(path: String, password: ByteArray = byteArrayOf()): PdfDocument

Opens the PDF at path, loading the WHOLE file into memory first (thin sugar over PdfDocument.open; there is no incremental file reader).

fun PdfDocument.Companion.openFile(path: String, password: ByteArray = byteArrayOf()): PdfDocument

Opens the PDF at path, loading the WHOLE file into memory first (thin sugar over PdfDocument.open; there is no incremental file reader).

fun PdfDocument.Companion.openFile(path: String, password: ByteArray = byteArrayOf()): PdfDocument

Opens the PDF at path, loading the WHOLE file into memory first (thin sugar over PdfDocument.open; there is no incremental file reader).

Link copied to clipboard
fun openOrNull(bytes: ByteArray, password: ByteArray = byteArrayOf(), allowInvalidPassword: Boolean = false): PdfDocument?

open, but null instead of an exception on a malformed or unauthenticated file.