Skip to main content
Version: 2027.02 Beta
View as Markdown

Perspective - Signature Pad Scripting

This page details the component-specific events and functions available for Perspective's Perspective's Signature Pad component. Right-click on the component or select Components from the Designer menubar to access the Configure Events and Configure Scripts popups.

Component Events​

The Perspective Event Types Reference page describes all the possible component event types for Perspective components.

onSignatureSubmitted​

Event is fired after the Gateway has received a submitted signature.

note

This component event is designed to be used in tandem with a run action script. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.

event.signature​

  • Object Path

    • event.signature
  • Type

    • String
  • Description

    • Base64-encoded PNG DataURL of the submitted signature.

event.signatureFile.name​

  • Object Path

    • event.signatureFile.name
  • Type

    • String
  • Description

    • A name for the signature file.

event.signatureFile.size​

  • Object Path

    • event.signatureFile.size
  • Type

    • Integer
  • Description

    • The size of the signature image file in bytes.

event.signatureFile.copyTo(filePath)​

  • Object Path

    • event.signatureFile.copyTo()
  • Description

    • Saves the uploaded signature file at a location accessible to the Gateway.
  • Parameters

    • String filePath - The path to where the file should be saved on the Gateway.
  • Return

    • None

event.signatureFile.getBytes()​

  • Object Path

    • event.signatureFile.getBytes()
  • Description

    • Returns a bytearray of the image, allowing the signature file to be saved from the session (with system.perspective.download()).
  • Parameters

    • None
  • Return

    • byteArray - The raw data of the incoming file.

event.signatureFile.getString()​

  • Object Path

    • event.file.getString()
  • Description

    • Fetches the incoming file data and attempts to parse it as a string via UTF-8 (Eight-bit UCS Transformation Format) encoding. Defaults to UTF-8 (super common), but can use other character sets. Passed as a string, for example getString("UTF_16BE).
  • Parameters

    • None
  • Return

    • byteArray - The raw data of the incoming signature file.

onSignatureCleared​

This event is fired when the Gateway has received a signal that the signature has been cleared.

note

This component event is designed to be used in tandem with a run action script. Within the script action, special properties and methods are available on the event object, which is passed to the script action as a parameter.

event​

  • Object Path

    • event
  • Type

    • Null
  • Description

    • An empty event object.

Component Functions​

.clearSignature()​

  • Description

    • Clears the current signature on the component
  • Parameters

    • None
  • Return

    • Nothing

.submitSignature()​

  • Description

    • Submits the signature, triggering the onSignatureSubmitted component event.
  • Parameters

    • None
  • Return

    • Nothing

Extension Functions​

This component does not have extension functions associated with it.