ElectronicSignatureOptions

data class ElectronicSignatureOptions @JvmOverloads constructor(val signatureSavingStrategy: SignatureSavingStrategy = SignatureSavingStrategy.SAVE_IF_SELECTED, val signatureColorOptions: SignatureColorOptions = SignatureColorOptions.fromDefaults(), val signatureCreationModes: List<SignatureCreationMode> = listOf(SignatureCreationMode.DRAW, SignatureCreationMode.IMAGE, SignatureCreationMode.TYPE), val defaultThickness: Float = DEFAULT_THICKNESS_PT, val defaultAlpha: Float = DEFAULT_ALPHA) : Parcelable

Options for configuring the ElectronicSignatureFragment. An instance of this can be passed to .

Constructors

Link copied to clipboard
constructor(signatureSavingStrategy: SignatureSavingStrategy = SignatureSavingStrategy.SAVE_IF_SELECTED, signatureColorOptions: SignatureColorOptions = SignatureColorOptions.fromDefaults(), signatureCreationModes: List<SignatureCreationMode> = listOf(SignatureCreationMode.DRAW, SignatureCreationMode.IMAGE, SignatureCreationMode.TYPE), defaultThickness: Float = DEFAULT_THICKNESS_PT, defaultAlpha: Float = DEFAULT_ALPHA)

Types

Link copied to clipboard
object Companion

Provides factory methods and configuration for electronic signature fonts.

Properties

Link copied to clipboard
@get:FloatRange(from = 0.0, to = 1.0, fromInclusive = false)
val defaultAlpha: Float

Opacity applied to created signatures, where 1 is fully opaque. Applies to drawn, typed and image signatures alike. Must be greater than zero and at most 1. Defaults to 1.

Link copied to clipboard
@get:FloatRange(from = 0.0, fromInclusive = false)
val defaultThickness: Float

Stroke thickness drawn signatures use, in PDF points relative to the signing canvas. Must be greater than zero. Defaults to DEFAULT_THICKNESS_PT, which is what the dialog has always drawn with.

Link copied to clipboard

Defines the signature color options available when using the "Draw" or "Type" signing UI. Defaults to black, purple, and blue. signatureColorOptions Can be created from @ColorRes or @ColorInt with SignatureColorOptions.fromColorRes and SignatureColorOptions.fromColorInt respectively. Defaults can be created with SignatureColorOptions.fromDefaults

Link copied to clipboard

Which modes do you want to support? Defaults to Draw/Type/Image.

Link copied to clipboard

The saving strategy used when adding signatures. Defaults to . This will only work if a com.pspdfkit.signatures.storage.SignatureStorage has been created and set via com.pspdfkit.ui.PdfFragment.signatureStorage, otherwise SignatureSavingStrategy.NEVER_SAVE will be used.