CoroutinePrintDocumentAdapter

A PrintDocumentAdapter that exposes onLayout and onWrite functions as suspend functions that will automatically invoke the correct callback methods.

Inheritors

Constructors

Link copied to clipboard
constructor(context: CoroutineContext)

Functions

Link copied to clipboard
open override fun onFinish()
Link copied to clipboard
abstract suspend fun onLayout(oldAttributes: PrintAttributes?, newAttributes: PrintAttributes, extras: Bundle?): PrintDocumentInfo
override fun onLayout(oldAttributes: PrintAttributes?, newAttributes: PrintAttributes, cancellationSignal: CancellationSignal, callback: PrintDocumentAdapter.LayoutResultCallback, extras: Bundle?)
Link copied to clipboard
open fun onStart()
Link copied to clipboard
abstract suspend fun onWrite(pages: Array<out PageRange>, destination: ParcelFileDescriptor): Array<out PageRange>
override fun onWrite(pages: Array<out PageRange>, destination: ParcelFileDescriptor, cancellationSignal: CancellationSignal, callback: PrintDocumentAdapter.WriteResultCallback)