Skip to main content

JavaScript Wizard API

Introduction

The Wizard library provides interactive controls for STU tablets devices.

Methods summary

Methods
addObject
addObjectButton
addObjectCheckBox
addObjectDisplayAtShutdown
addObjectImage
addObjectInking
addObjectInput
addObjectInputEcho
addObjectRadioButton
addObjectSignature
addObjectText
addPrimitive
getWhen
getWidth
getWho
getWhy
importIso
isCaptured
isCrossedOut
isEncrypted
isExternal
isEvaluation
ReadEncodedBitmapBinary
RenderBitmap
setExtraData
setEncryptionPassword
setLicence
setSigData
setTextData
setPrivateKey
setPublicKey

Hash

The hash object is used to bind a signature to a document. For example: it is necessary to sign a PDF. To do this, we create a hash document using:

const hash = new Module.Hash(hashType);

where the hashType can be any of the following:

  • Module.HashType.None
  • Module.HashType.MD5
  • Module.HashType.SHA1
  • Module.HashType.SHA224
  • Module.HashType.SHA256
  • Module.HashType.SHA384
  • Module.HashType.SHA512

Then using the function add(byteArray) we add the content of the PDF.

hash.add(pdfContent);

AdditionalImportIsoData

This object is used to apport extra properties to the ISO format. These options are:

setWho(who)

Set the name of the person who signed, where the who parameter is a string.

setWhy(why)

Set the reason to sign, where the why parameter is a string.

setWhen(when)

Set the date when the signature was captured, where the when parameter is a JavaScript Date object.

putExtraData(key, value)

Put in additional data, where key is a string with the name of the extra data, and value is another string with its value.