sign Document
signDocument provides functionality to insert a digital signature in a document
The signing workflow, including all com.pspdfkit.document.providers.WritableDataProvider callbacks on com.pspdfkit.signatures.SignerOptions.outputDataProvider, runs on a background thread regardless of the thread this method is called from. onSuccess and onFailure are invoked on callbackDispatcher, which defaults to the main thread.
Parameters
contains various configurations needed for the signing. This can be further looked into com.pspdfkit.signatures.SignerOptions
if you want custom signing behaviour, add it here. For example sending the data to an external system to sign. Otherwise this can be null and the private key in com.pspdfkit.signatures.SignerOptions will be used. This lambda is run on a background IO thread (with Dispatchers.IO coroutine).
is called when any exception is thrown
provides a callback where customer can use com.pspdfkit.signatures.SignerOptions.outputDataProvider as a result param.