Package-level declarations

Types

Link copied to clipboard
object KiteDoc

Opens a document without being told which format it is.

Link copied to clipboard

A document format KitePDF can read.

Functions

Link copied to clipboard
fun KiteDoc.open(file: File, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

openFile for a File you already hold.

fun KiteDoc.open(stream: InputStream, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Drains stream and opens what comes out. The stream is closed either way.

fun KiteDoc.open(context: Context, uri: Uri, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Opens a content uri, which is what the system file picker (ACTION_OPEN_DOCUMENT) and share intents actually hand you. A content:// Uri has no file path, so this reads it through Context.getContentResolver.

fun KiteDoc.open(data: NSData, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Opens data you already hold, e.g. from a network call or the pasteboard.

fun KiteDoc.open(url: NSURL, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Opens an NSURL. A file URL is read straight off disk; anything else is left to Foundation, so a file:// bookmark from UIDocumentPickerViewController works, and a remote URL blocks the calling thread. For remote documents prefer the kitepdf-net artifact, which fetches asynchronously.

fun KiteDoc.open(file: File, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

openFile for a File you already hold.

fun KiteDoc.open(stream: InputStream, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Drains stream and opens what comes out. The stream is closed either way.

Link copied to clipboard
fun KiteDoc.openFile(path: String, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Reads the file at path and opens it as whichever format it is.

fun KiteDoc.openFile(path: String, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Reads the file at path and opens it as whichever format it is.

fun KiteDoc.openFile(path: String, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Reads the file at path and opens it as whichever format it is.

fun KiteDoc.openFile(path: String, password: String = "", epubSettings: EpubSettings = EpubSettings()): KiteDocument

Reads the file at path and opens it as whichever format it is.