Nutrient Web SDK

ReferenceElectronicSignaturesConfiguration

Type Alias ElectronicSignaturesConfiguration

Defines specific configuration options related to the electronic signatures feature.

Type Alias

Example

NutrientViewer.load({
electronicSignatures: {
creationModes: [NutrientViewer.ElectronicSignatureCreationMode.IMAGE],
fonts: [new NutrientViewer.Font("mycustomfont")]
}
});

Properties

colorPresets

Optional

Optionally set color presets to be used in the Electronic Signatures dialog.

Example

Setting custom color presets for the Type Electronic Signature UI

 NutrientViewer.load({
electronicSignatures: {
colorPresets: [
{
color: Color.RED,
localization: {
id: 'red',
defaultMessage: 'Red',
description: 'Red color',
},
},
{
color: Color.ORANGE,
localization: {
id: 'orange',
defaultMessage: 'Orange',
description: 'Orange color',
},
},
{
color: Color.YELLOW,
localization: {
id: 'yellow',
defaultMessage: 'Yellow',
description: 'Yellow color',
},
},
],
}
});
("DRAW" | "IMAGE" | "TYPE")[]

Array of tabs that should be offered to users on the electronic signatures modal.

fonts

Optional

Array of NutrientViewer.Font fonts that users can choose from when typing text for adding a new electronic signature.

You can specify any additional font to use on a custom style sheet set via Configuration#styleSheets via @font-face CSS at-rule.

When specifying the name of each NutrientViewer.Font record make sure that it matches the one specified on the style sheet.

Optionally set an initial default text for the Type Electronic Signature UI.

The default placeholder will be shown if the callback does not return a non-empty string, or is not set to a non-empty string.

Example

Setting a default text for the Type Electronic Signature UI

 NutrientViewer.load({
electronicSignatures: {
setDefaultTypeText: () => "My default text"
}
});