Companion

object Companion

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.