Skip to content

  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us

Customization – Wizard SDK

  • 1. What is a Wizard
  • 2. List of Javascript API Calls

Customization – PDF & Form Preparation

  • PDF Forms creation
  • 1. Tags
  • 2. Acrofields
  • 3. Sample document

Integration – REST API

  • 1. Introduction
  • 2. Download
  • 3. Upload

Integration – App-to-App

  • Introduction
  • How does it work?
  • START-ACTIVITY-FOR-RESULT (APP – SIGNATUS – APP)
  • Sending data to Master Wizard via Intent
  • Runtime Configuration Parameters (Display, Fields, Signing Process)

Hardware – Certified Devices

  • Signatus Certified Devices List
View Categories
  • Home
  • Documentation
  • Mobile App - Signatus
  • Customization – Wizard SDK
  • 2. List of Javascript API Calls

2. List of Javascript API Calls

Use the provided ExampleWizard.zip and other sample wizards included with Signatus as a reference when building your own wizard.

Most JavaScript functions in the Wizard SDK accept their input as a JSON object, unless stated otherwise. Instructions for including the SDK library in your wizard are described in the previous section. Required JSON keys are marked with an asterisk (*).

Wizards are supported in the Android, Windows, and iOS versions of the Signatus native application. Not every API call is available on every platform—platform support is listed in the heading of each API call.

As wizard support was extended to Windows and iOS, the SDK was updated to support asynchronous execution in addition to synchronous calls.

Synchronous-to-asynchronous wrapper for Windows and iOS compatibility #

Some SDK functions are synchronous and return a result immediately. Because synchronous calls are not supported on Windows, the SDK provides the optional call parameter. When call is specified, the function behaves asynchronously and returns the result via the named callback function. The callback receives a JSON result object.

Example using getInfo:

  • Synchronous call: getInfo({"code":"Version"}) → returns "3.15.7"
  • Asynchronous call: getInfo({"code":"Version","call":"OnVersion"})
    This triggers the callback function OnVersion, passing:

{"parameter":{"status":"OK","message":"","data":"3.15.7"}}


2.1 addJpgToPdf   (Android) #

Adds one or more images to the end of a PDF document. The images are placed on a new page that becomes the document’s last page. Up to two images can be placed on a single page.

function Boolean addJpgToPdf (JSON)
InputJSON with the String attributess:   *file, *list
OutputTrue/false
ExampleaddJpgToPdf({‘file’: ‘final/abc.pdf’, ‘list’: [{‘name’:’1234.jpg’, ‘length’: ‘423213’}, {‘name’:’456.jpg’, ‘length’: ‘98965’}]}); Updates the document ‚abc.pdf‘ by adding a page that contains the 2 specified images.

2.2 alert (Android, Windows, iOS) #

Displays a short toast notification at the bottom of the screen showing the specified text for 1 second.

function alert (JSON)
InputString argument
OutputNone
Examplealert (‘1234’) 1234 will be shown in a 1 sec. toast

2.3 alertD (Android, Windows, iOS) #

Works the same way as alert, but the toast message is displayed only when the log level is set to debug.

function alertD (JSON)
InputString argument
OutputNone
ExamplealertD (‘1234’) 1234 will be shown in a 1 sec. toast if log level is set to debug

2.4 cancel (Android, Windows, iOS) #

The cancel function is used to exit the HTML wizard or to control the Signatus application state, such as minimizing, restarting, or closing the application.

function cancel (JSON)
InputEmpty JSON object or JSON with string attribute: *state -Empty JSON: closes the HTML wizard a returns control to the Signatus menu -state = off: closes Signatus application -state = minimize: minimizes Signatus application (like button Home) -state = restart : restarts Signatus application
OutputNone
Examplecancel ({‘state’: ‘off’})

2.5 clearWebView (Android) #

Clears the browsing history, cache, and form data of the web view used by the wizard. This is especially useful at the end of a multi-user session to ensure that information entered by one user (such as login credentials) is not visible to subsequent users.

function clearWebView (JSON)
InputNone
OutputNone
ExampleclearWebView ({})

2.6 convertJSONtoXML (Android) #

Converts a JSON value to XML format. This can be used when data needs to be transformed from JSON and sent to an external system that requires XML.

function convertJSONtoXML (JSON)
InputJSON
Outputstring (format xml)
ExamplejsonXML = {‘country’: ‘sk’, ‘city’: ‘Bratislava’}; convertJSONtoXML(jsonXML); e.g.    <city>Bratislava</city>    <country>sk</country>

2.7 convertXMLtoJSON   (Android) #

Converts an XML value to JSON format

function convertXMLtoJSON (JSON)
InputJSON with the String attributes:  *xml
OutputJSON as string
ExamplejsonXML = {‘xml’: ‘<city>Bratislava</city><country>sk</country>‘}; convertXMLtoJSON (jsonXML); e.g. {‘country’: ‘sk’, ‘city’: ‘Bratislava’};

2.8 copy  (Android, Windows, iOS) #

Copies a file to the specified folder.
Note: This function works only within the wizard workspace. To move a file to a local channel, use the SaveToLocalChannel function instead.

function Boolean copy (JSON)
InputJSON with the String attributes:  *file, *folder
Outputtrue / false 
Examplecopy ({‘file’: ‘zxc.zip’,’folder’: ‘final’} ) copies zxc.zip to the folder ‚final/‘ and returns true if successful

2.9 createFolder (Android, Windows, iOS) #

Creates a new folder and returns the value true if successful.

function Boolean createFolder (JSON)
InputJSON with the String attribute:   *folder
Outputtrue /false
ExamplecreateFolder ({‘folder’: ‘data’})  Creates a folder named ‘data’.

2.10 createFolders   (Android, Windows, iOS) #

Creates multiple new folders and returns the value true if successful.

function Boolean createFolder (JSON)
InputJSON with the JSON ARRAY attribute:   *folders
Outputtrue /false
ExamplecreateFolders ({‘folders’: [‘temp’, ‘unziped’]})  Creates  folders named temp and unziped.

2.11 deleteFile (Android, Windows, iOS) #

Deletes the file specified by the input file path and returns true if the operation is successful.
If the channel parameter is provided, the file is deleted from the specified channel.

function Boolean deleteFile (JSON)
InputJSON with the String attributes:  *file, channel, call
Outputtrue/false
ExampledeleteFile ({ ‘file’: ‘up_TrialRequest.pdf’ }) deletes ‘up_TrialRequest.pdf’ deleteFile ({ ‘file’: ‘up_TrialRequest.pdf’, ‘channel’:’Device storage’, ‘call’:’onDeleteFile’ })

2.12 deleteFolder (Android, Windows, iOS) #

Deletes the specified folder along with all files and subfolders it contains.

function Boolean deleteFolder (JSON)
Inputparameter: *folder
Outputtrue / false
ExampledeleteFolder ({‘folder’: ‘data’}) Deletes the ‚data/‘ folder and all the files in the folder.

2.13 deleteFolders (Android, Windows, iOS) #

Deletes the specified folders along with all files and subfolders they contain.

function Boolean deleteFolder (JSON)
Inputparameter: *folder  with JSON ARRAY of folder names
Outputtrue / false
ExampledeleteFolders ({‘folders’: [‘temp’, ‘unziped’]}) Deletes the temp and unzipped folders and all the files in the folders.

2.14 deleteProfile (Android) #

Clears all data stored in the device’s My Profile section. My Profile is typically used to temporarily store information, such as login credentials for a configured REST channel during wizard execution. The wizard can define rules that control when this stored information should be removed.

function Boolean deleteProfile (JSON)
InputJSON with the String attributes:   *code, *data
OutputTrue / false
ExampledeleteProfile({}); Deletes all information in device profiles.

2.15 download (Android, Windows, iOS) #

Downloads a file from a server using the SIGNATUS REST API.

For operations that do not require network communication (for example, when using local storage channels), the function can be used synchronously. In this case, the parameters call, saveChannel, user and password must be left empty. Only the url, savePath, channel parameters are required.

The data parameter is used to attach additional metadata to the downloaded file.

Function JSONArray download (JSON)
InputJSON with the String attributes:    *savePath – path to the workspace directory where the downloaded file is saved, *url – absolute or relative download URL (if relative URL is used, the channel parameter is required), channel – predefined download channel name, login – whenused with the value „channel“, the Login URL of the channel will be used to log in before downloading the file, cookieToHolder – if true, do not reuse the cookie obtained during login in subsequent REST downloads (repeat login with password instead) – useful if you need to communicate with different servers that do not share the same session ID (cookies), default is false, user – user name for server authentication, password – password for server authentication, call – callback Javascript function name, id – unique document ID, saveChannel – Local Device Storage channel name, where downloaded file is stored (if saveChannel is set, savePath parameter is ignored), filename – how to name the downloaded file in the destination folder, data – additional data in JSON format that will be stored in a separate metadata file linked to the downloaded file, overwrite – if false (default), avoid overwriting existing files by automatically renaming them in the destination directory, useChannelAck – if true, acknowledge download using the ACK URL configured for the channel (default is false), deleteWhenAckFailed – if true and acknowledgement of download (using the ACK URL) fails, the downloaded file is deleted from the device so that only successfully acknowledged files are visible (default is false), code – unique identifier of the download request – this code will be logged in the application log and passed to the asynchronous callback function to identify which download the result belongs to, showProgress – if true, shows a progress animation during the download (default is false).
OutputJSON with String attributes: savePath, status (OK / ERROR), message OK Output Example: {     “parameter“:{        “status“:”OK”,       “message“:”Download OK”,       “savePath“:”testspace\/download\/downloaded.pdf”,       “data“:{           “id“:”downloaded.pdf”,          “filename“:”downloaded.pdf”,
          “url“:”…url…”,          “size“:102317,          “lastModified“:1558951202000       },       “transactionCode“:”-423203766″,       “code“:200    } }   Error Output Example: {     “parameter“:{        “status“:”ERROR”,       “message“:”Source ‘…wrong-path…’ does not exist”,       “savePath“:””,       “data“:{        },       “transactionCode“:”-1″,       “code“:600    } }
ExampleSynchronous: download({‘savePath’:’download/testPdf.pdf’, ‘channel’:’Browse’ , ‘url’:’file:/storage/emulated/0/Signatus/Downloaded/41580922.pdf’ }) Asynchronous: download({‘savePath’:’download/testPdf.pdf’, ‘channel’:’Scan’ , ‘url’:’9204e8c0-72a6-476d-a91d-171f811834e0/41580922.pdf’ , ‘call’:’onDownload’ , ‘saveChannel’:’ToSign’, ‘filename’:’testPdf.pdf’, ‘data’:{‘contractNumber’ : ‘8954’, ‘customer’ : ‘Anasoft’} })

2.16 downloadList (Android, Windows, iOS) #

Retrieves a list of available files from the specified channel as a JSON array (for example, to display documents available for signing).

The function supports multiple channel types configured in the Signatus settings, including Browse local storage, Browse REST, Browse CMIS, Send to local storage, Upload REST, and Upload CMIS. When used with upload channels, it returns the list of files that are currently pending upload.

For operations that do not require network communication—such as local storage and upload channels—the function can be executed synchronously.

Function JSON downloadList (JSON)
InputJSON with the String attributes:   *url – absolute or relative download URL (if relative URL is used, the “channel” parameter is required; if “url” is specified, the processing will be asynchronous), channel – predefined download channel name, cookieToHolder – if true, do not reuse the cookie obtained during login in subsequent REST downloads (repeat login with password instead) – useful if you need to communicate with different servers that do not share the same session ID (cookies), default is false, user – user name for server authentication (if specified, the processing will be asynchronous), password – password for server authentication, call – callback Javascript function name (for asynchronous processing).
OutputIf the above conditions for synchronous processing are fulfilled, the result is returned as JSON string. Otherwise, the return value is an empty string and the actual result is returned asynchronously as an argument to the specified callback function. The result is an unparsed JSON string containing one object attribute parameter. The parameter object contains the following attributes: status String attribute (OK / ERROR), Code: 400/650  message String (human-readable text for status), data JSON array – list of documents and subfolders.   Example of Output { 
   “parameter”:{ 
      “status”:
“OK”, //coud be ERROR
      “message”:
“Download OK”, // http status messages or 600+ logical messages
      “code”:
200, //http status code or 600+ logical code  (wifi disabled: 650)
      “messageDetail”:
“”,
      “data”:[ 
         { 
            “filename”:
“samlpe.pdf”,
            “state”:
“tosign”,
            “modification”:
“2019-08-01 14:42:54”,
            “id”:
“id”,
            “reuploadState”:
“signed”,
            “url”:
“…url…”,
            “date”:
timestamp,
            “contractNumber”:
“Smith15”,
            “box”:
“Inbox”,
            “customerName”:
“AbcDef Gmbh”,
            “group”:
“sts”
         }
     ] }
ExampleSynchronous: onDownloadList(downloadList({ ‘channel’:’Browse’ }) Asynchronous: downloadList({ ‘channel’:’Browse’ , ‘call’:’onDownloadList’ })
Example of how to receive the resultfunction onDownloadList(result) {     var resultJson = JSON.parse(result);     var param = resultJson.parameter;     if (param.status == ‘OK’) {         param.data.forEach(…)     } }

2.17 email (Android) #

Opens the Android system email chooser, allowing the user to select an email client. The selected client is launched with the email fields prefilled, including To, CC, BCC, subject, and message body.

function filesToJson (JSON)
InputJSON with attributes: *email – JSON Array of email address, cc – JSON Array of email address, bcc – JSON Array of email address, *subject – email subject *text – email body file – path to the file to be sent
Outputempty
Example{               “email”: [                              “emailTo@example.com”               ],               “cc”: [                              “cc1@example.com”,                              “cc2@example.com”               ],               “bcc”: [                              “bcc@example.com”               ],               “subject”: “Email subject”,               “text”: “Email text”,               “file”: “/pdf/PdfToSend.pdf” }

2.18 exportSettings (Android) #

Enables the export of application settings to an encrypted file. This functionality is available both in the application settings and through the wizard.

The encrypted settings file can be transferred to another device to easily replicate the configuration, or uploaded to the license server and distributed automatically to devices during license activation.

function exportSettings (JSON)
InputEmpty JSON.
OutputJSON object with keys : success : true / false path : path to exported file
ExampleexportSettings ({})

2.19 filesToJson (Android, iOS) #

Reads the specified binary files and converts them into a single JSON file containing the Base64-encoded contents of each source file. This is useful for integrations where only one JSON file can be transmitted.

function filesToJson (JSON)
InputJSON with attributes: *file – stringwithpath to the destination JSON file, *list – array of objects with attributes respective to each source file: *path – path to a source file, *name – name to identify the file in the resulting JSON.
Outputtrue on success, false on failure
ExamplefilesToJson ({‘file’: ‘base64data.json’, ‘list’: [{‘name’: ‘file1’, ‘path’: ‘file1.pdf’}, {‘name’: ‘file2’, ‘path’: ‘file2.pdf’}]}) Creates a JSON file named ‘base64data.json’ with the following contents: {‘file1’: ‘…<BASE64 of file1.pdf>’, ‘file2’: ‘…<BASE64 of file2.pdf>’}

2.20 formPdf (Android, iOS) #

Updates the AcroForm fields of the specified PDF using values provided in a JSON object. The JSON name–value pairs must match the names of the corresponding AcroForm fields. The optional csv parameter can be used to save an additional copy of the field values as a CSV (Comma-Separated Values) file.

function Boolean formPdf (JSON)
InputJSON with the String attributes:   *file, *data, csv, flatten
Outputtrue /false 
ExampleformPdf ({‘file’: ‘/data/input.pdf’, ‘csv’: ‘data.csv’, ‘flatten’: true, ‘data’: {‘ name’:’John’, ‘ lastname’:’Doe’}}) Updates the Acrofields of ‚input.pdf‘ and also copies the values to ‚data.csv‘.

2.21 getAppConfig (Android) #

Gets the value of an internal SIGNATUS configuration parameter (not reachable via GUI). Contact us in order to get the desired parameter and possible output values.

function getAppConfig (JSON)
InputJSON with String attributes:  *code
OutputString value
ExamplegetAppConfig( {‘code’:’cert.issuer.name’} );

2.22 getAuditLog (Android) #

Exports the audit log to the file defined by the specified file path and returns true if successful. The log will contain actions since the launch of the wizard.

Function boolean getAuditLog (JSON)
InputJSON with the String attribute:  *savePath
Outputtrue/false
ExamplegetAuditLog ({‘savePath’: ‘final/audit.log’ }) Saves the audit log to the specified file.

2.23 getAuthentication   (Android, Windows, iOS) #

Returns the access token of the OpenID Connect authentication.

Function getAuthentication ()
InputEmpty JSON object
OutputJSON object containing the authentication data (access token)
ExamplegetAuthentication({}) e.g. returns {“access_token”:”…”}

2.24 getChannels (Android) #

Returns information about all upload channels configured in the Signatus application settings.

Function JSONArray getChannels (JSON)
InputNone
OutputList of channels
ExamplegetChannels ({}) e.g. [{‘name‘:‘local’}, {‘name‘:‘REST’}]

2.25 getFormFileName (Android) #

Returns the name of the file the wizard was started with. It can be used e.g. as a title on top of the screen.

Function String getFormFileName ()
InputNone
OutputFile name
ExamplegetFormFileName() e.g. returns ‘formTest.pdf’

2.26 getInfo (Android, Windows, iOS) #

Returns information about the device. This data can be stored as metadata, written to an audit file, or embedded into PDF document properties to provide additional evidence of how the signature was created.

Function String getInfo ()
InputJSON with the String attribute:   *code – one of: UID, IPAddress, Version, MACAddress, NetworkType, IMEI, SerialNumber, SimSerialNumber, Manufacturer, Model, AndroidOSVersion  == OSVersion, AndroidSDK == SDK, GPS, ApplicationId, Battery , AndroidId == OSId  or  All  for  all info attributes  in JSON fromat
Outputvalue in String format
ExamplegetInfo ({‘code’:’UID’}) Returns e.g. ‘00000000-4bf2-a3c2-ffff-ffffc6741f307’.

2.27 getLicense (Android) #

Returns information about Signatus license activated on the device.

Function String getLicense ()
InputEmpty JSON
OutputJSON object with keys activation_date, expiry_date,last_modified,license_hash,pdf_watermark,json_data
ExamplegetLicense ({})

2.28 getMD5 (Android) #

Returns hash value used as a checksum to verify data integrity.

https://en.wikipedia.org/wiki/MD5

Function String getMD5 ()
InputJSON with the String attribute:   *md5 – plain text
Outputvalue in String format
ExamplegetMD5({‘md5’:  ‘hash test’});  Returns e.g. ‘b6ecdcfccf524b9b81cf0240ddb1f300’.

2.29 getPdfInfo (Android) #

Returns metadata from a PDF file downloaded to the device through the wizard, such as Author, Title, Subject, and Keywords. This information is read from the corresponding metadata fields within the PDF and can be used later during the wizard workflow.

Function String getPDFInfo ()
InputJSON with the String attribute:   *path – path to a source file
Outputvalue in String format
ExamplegetPdfInfo({‘path’:  ‘/pdf/final.pdf’});  Returns e.g. {‘Keywords‘: ‘text123‘, ‘Title‘: ‘abc‘, ‘Author‘: ‘Tom‘ }. From version 4.1.6 call has to be changed and exact key has to be specified so the value can be returned (example keys below) getPdfInfo({‘path’:  ‘/pdf/final.pdf’, values : [ ‘Email’,’Name’ ] }); Returns e.g. {‘Email’: ‘mail@mail.com’, ‘Name’: ‘Tom’}. Only the requested ones are returned and are not null

2.30 getPdfAuditData (Android, Windows) #

Returns the collection of audit data for the recently processed PDF.

Function String getPdfAuditData ()
InputJSON with the String attribute:   *call – callback function name
OutputAudit data in JSON ARRAY format
ExamplegetPdfAuditData({‘call’:  ‘onPdfAudit’}); Return pdf audit data in JSON ARRAY format . Example : [{“blockName”: “_SC_C1_BT_”, “auditData”:”{‘docName’:’TEST3.pdf’,’data’:[{‘action’:’OPEN_DOCUMENT’,’message’:”,’id’:”,’date’:’2020-07-29T10:14:58.9630000+02:00′},{‘action’:’OPEN_SIGNATURE_PAD’,’message’:”,’id’:’_SC_C1_BT_’,’date’:’2020-07-29T10:15:03.2990000+02:00′},{‘action’:’ACCEPT_SIGNATURE_PAD’,’message’:”,’id’:’_SC_C1_BT_’,’date’:’2020-07-29T10:15:05.5900000+02:00′}]}”, “pdfCheckSum”: “d5c91a17306a5d753958cb3ad84f897bdf7e2705” }, {“blockName”: “_SC_C2_BT_”, “auditData”:”{‘docName’:’TEST3.pdf’,’data’:[{‘action’:’OPEN_SIGNATURE_PAD’,’message’:”,’id’:’_SC_C2_BT_’,’date’:’2020-07-29T10:15:08.1680000+02:00′},{‘action’:’ACCEPT_SIGNATURE_PAD’,’message’:”,’id’:’_SC_C2_BT_’,’date’:’2020-07-29T10:15:10.8400000+02:00′}]}”, “pdfCheckSum”: “272eee4909f99cda92d7d894de8c65cbc83afd05” }

2.31 getProfile (Android) #

Returns the value from an attribute stored within “My Profile” section of Signatus application installed on the device.

function String getProfile (JSON)
InputJSON with the String attribute:   *code
Outputvalue in String format
ExamplegetProfile({ ‘code’: ‘ firstname’ }); Returns value ‘Lukas’ from device profile attribute ,firstname’.

2.32 getQRcode (Android, iOS) #

Launches the barcode scanning activity and, once completed, invokes a JavaScript callback function with the scanned result data.

function getQRcode (JSON)
InputJSON with the string attributes: *call –function to call after the QR code is scanned, parameter –additional data passed to the callback function.
OutputNone or callback(parameter)
ExamplegetQRcode ({‘call’: ‘setData’, ‘ parameter’: ‘otp’} ) Scans a bar code and returns the result to the ‚setData‘  Javascript function along with the custom parameter with some arbitrary value ‚otp‘.

2.33 getSettings (Android, Windows, iOS) #

Returns the current value of a SIGNATUS settings entry (one of the parameters reachable via the settings GUI). Similar to getAppConfig, but in case of function getAppConfig you can get the parameters NOT reachable via GUI.

function String getSettings ()
InputJSON with the String attribute: *code – key identifying the settings entry.
OutputString or boolean containing the configuration value.
ExamplegetSettings ({‘ code’: ‘draw_mode’}) Returns e.g. ‘SYSTEM’.

List of the settings codes:

Codes marked +suffix can be used without a suffix or with a number 1-5 appended to the code. The resulting 6 possible codes are used to distinguish among multiple channels of the same type (e.g. REST download).

login_enabled 
login_username 
login_password 
login_time_out 
form_enabled 
browse_file_enabled 
browse_web_enabled 
browse_cmis_enabled 
browse_rest_enabled 
browse_google_drive_enabled 
upload_cmis_enabled 
upload_rest_enabled 
upload_local_enabled 
upload_google_drive_enabled 
browse_file_root+suffix
browse_file_delete 
browse_web_url 
browse_web_qr_code_scanner 
browse_cmis_channel_name+suffix
browse_cmis_server_url+suffix
browse_cmis_username+suffix
browse_cmis_password+suffix
browse_cmis_query+suffix
browse_cmis_copy_to_local+suffix
browse_rest_channel_name+suffix
browse_rest_list_url+suffix
browse_rest_login_url+suffix
browse_rest_oidc_token_endpoint+suffix
browse_rest_ack_url+suffix
browse_rest_username+suffix
browse_rest_password+suffix
browse_rest_copy_to_local+suffix
upload_entry 
upload_file_directory 
upload_rest_channel_name 
upload_web_url+suffix
upload_web_username+suffix
upload_web_password+suffix
upload_web_content_key+suffix
upload_rest_login_url+suffix
upload_rest_oidc_token_endpoint+suffix
upload_web_metadata+suffix
upload_cmis_channel_name+suffix
upload_cmis_server_url+suffix
upload_cmis_username+suffix
upload_cmis_password+suffix
upload_cmis_directory+suffix
anotation_enabled 
sign_anywhere_enabled 
scanning_enabled 
zip_enabled 
email_enabled 
email_text 
email_subject 
welcome_time 
templates_folder 
last_import 
high_quality_rendering 
csv_export_enabled 
sign_time_format 
biometry_enabled 
qr_code_scanner_enabled 
default_files_enabled 
menu_file_channel_name 
upload_file_channel_name 
menu_web_channel_name 
menu_form_channel_name 
details_file_view 
knox_enabled 
move_file 
zoom_enabled 
flatten_enabled 
cloud_signature_environment 
cloud_signature_username 
jpg_in_document_enabled 
upload_google_drive_directory+suffix
upload_google_drive_directory_id+suffix
upload_google_drive_account_name+suffix
upload_google_drive_channel_name+suffix
browse_google_drive_directory+suffix
browse_google_directory_drive_id+suffix
browse_google_drive_account_name+suffix
browse_google_drive_channel_name+suffix
draw_mode 
gps_enabled 
screen_orientation 
language 

* implementation for Windows is limited for some attributes only (“browse_rest_username”, “browse_rest_password”, “upload_web_username”, “upload_web_password”)

2.34 getVersion (Android, Windows, iOS) #

Returns the version of the SIGNATUS SDK of Signatus application installed on the device.

function String getVersion ()
InputNone
OutputVersion name in String format
ExamplegetVersion () Returns e.g. ‘3.10’.

2.35 gzip (Android) #

Compresses a given file using the GZIP compression.

function gzip (JSON)
InputJSON with String attributes:   *name – the destination GZ file, *file – path to the source file.
Outputtrue if successful, false if failed
Examplegzip ({‘name’: ‘abc.gz’,’file’: ‘abc.pdf’}) Compresses the file ‘abc.pdf’ to ‘abc.gz’.

2.36 isAuthentication (Android, Windows, iOS) #

Checks if the authentication stored with the ‘saveAuthentication’ function is valid.

Function boolean isAuthentication (JSON)
InputEmpty JSON
Output(Android)True if authentication is valid. False if the authentication does not exist, or has expired.
Output(Windows){ 
   “parameter”:{ 
      “status”:
“OK”, //coud be ERROR
      “message”:
“function name // if error it returns error message“  
       “data”: True / False
}
ExampleisAuthentication ({})

2.37 isDownloading (Android) #

Checks if the download or multi download of a file is running in the background. Function is suitable for scenarios, when there is an intention to cancel download of a multiple files, to find out if there is a file being downloaded at the moment.

Function boolean isDownloading (JSON)
InputEmpty JSON
OutputTrue if download is running in background. False if download not running.
ExampleisDownloading ({})

2.38 isSrcFilePath (Android) #

Returns information if the wizard was started via a PDF document referring to it. Wizard can be started via the metadata of the PDF document opened. Still available function, but becoming obsolete.

Function boolean isSrcFilePath ()
InputNone
Outputtrue / false
ExampleisSrcFilePath ()

2.39 jpgToPdf (Android) #

Creates a new PDF file with one JPG image per page where JPG images come from a list of existing files. Returns true if successful.

function Boolean jpgToPdf (JSON)
InputJSON with String attributes:   *file, *list
Outputtrue /false 
ExamplejpgToPdf ({‘file’: ‘ID.pdf’, ‘list’: [{‘name’:’1234.jpg’}, {‘name’:’456.jpg’}]}) Creates the new document ‚ID.pdf‘ with 2 pages being the specified 2 images. Note: The file list can be obtained as output of function ‚dirlist()‘

2.40 listDir (Android, iOS) #

Creates a JSON array containing the list of files in the specified folder.

function JSONArray listDir (JSON)
InputJSON with the String attribute: *folder
OutputJSON Array of files in the folder; Each JSON array entry contains the following name/value pairs: ‘name’:’filename’, ‘path’:’filepath’, ‘length’:’bytecount’.
ExamplelistDir ({‘folder’: ‘scan’}) Lists the files in the folder ‘scan’ e.g. ([{‘name‘:‘123.jpg’, ‘path‘:‘scan/123.jpg’, ‘length’: ‘423213’}, {‘name‘:‘456.jpg’, ‘path‘:‘scan/456.jpg’, ‘length’: ‘98965’}])

2.41 loadAcroformData (Android, iOS) #

Converts the information from all Acroform fields of a PDF document to a JSON structure suitable for editing the information in a SIGNATUS form.

Function JSONArray loadAcroformData (JSON)
InputJSON with the String attribute: *file
OutputJSON Array of Acroform fields in the pdf document
ExampleloadAcroformData ({‘file’: ‘doc.pdf’}) Returns e.g. [{‘ AcroFieldName’:‘value’}, {‘telefon‘:‘123456’}]

2.42 loadFile (Android, Windows, iOS) #

Reads a text file and returns it as a String.

function String loadFile (JSON)
InputJSON with the String attribute: *file
OutputContent of text file.
ExampleloadFile ({‘file’: ‘testData.txt’}) Reads ‘testData.txt’ and returns its content as a string.

2.43 logAudit (Android) #

Adds a line to the audit log.

Function void logAudit (JSON)
InputJSON with the String attribute: *text
OutputNone
ExamplelogAudit ({‘text’: ‘audit abc’} ) ‘audit abc’ will be written to the audit log file.

2.44 logD (Android, Windows, iOS) #

Logs the input text to a log file at the debug log level.

function logD (JSON)
InputJSON with String attribute: *text
OutputNone
ExamplelogD ({‘text’: ‘text abc’} )  

2.45 logE (Android, Windows, iOS) #

Logs the input text to a log file at the error log level.

function logE (JSON)
InputJSON with the String attribute: *text
OutputNone
ExamplelogE ({‘text’: ‘error abc’} ) ‘error abc’ will be written to the log file at the error log level.

2.46 mergePdf (Android) #

Combines multiple PDF documents into a single PDF for signing. This can be used when individual documents do not need to be signed separately, allowing all documents to be signed in one step and reducing both the number of signatures and the overall signing time.

function mergePdf (JSON)
InputJSON with the String attributes:   *file, *list
OutputTrue/false
Example              let list = [];               list.push({ ‘path’ : ‘abc.pdf’, ‘order’: 1});               list.push({ ‘path’ : ‘end.pdf’, ‘order’: 2}); mergePdf({‘file’: ‘temp/final.pdf’, ‘list’: list });   Creates the PDF document ’final.pdf’ by merging ‘abc.pdf’ and ‘end.pdf’ in the order specified in JSON.

2.47 move (Android, Windows, iOS) #

Moves a file to the specified folder.

function Boolean move (JSON)
InputJSON with String attributes:  *file, *folder
Outputtrue / false 
Examplemove ({‘file’: ‘zxc.zip’,’folder’: ‘final’} ) Moves zxc.zip to the folder ‚final‘ and returns true if successful.

2.48 monitorRotate (Windows) #

Rotates monitor screen to enable users sitting opposite each other to sign the documents without a need to rotate the device. For Windows platform only

function void monitorRotata (JSON)
InputJSON with String attribute:  *degree  – 0, 90, 180,270
Output
ExamplemonitorRotate({ ‘degree’: ‘180’, ‘call’: ‘onResult’ })

2.49 multiDownload (Android) #

Downloads multiple files from a server using the SIGNATUS REST API.

Function multiDownload (JSON)
InputJSON with an array attribute *list where each element has the attributes supported by the download function. or JSON with parameter state: CANCEL – Interrupts the download of all files. The currently downloaded file will be downloaded.
OutputNo synchronous result. The specified callback function and the onSystem function receives the asynchronous result that is a JSON with string attributes: savePath, status (OK / ERROR), message, progress (number of transfers done), max (number of all transfers requested)
ExamplemultiDownload({‘ list’ : [{‘savePath’:’download/testPdf.pdf’, ‘channel’:’Scan’ , ‘url’:’9204e8c0-72a6-476d-a91d-171f811834e0/41580922.pdf’ , ‘call’:’onDownload’ },…]}) or multiDownload[{‘state’: ‘CANCEL’}]

2.50 multiSend (Android) #

Downloads multiple files from a server using the SIGNATUS REST API.

Function multiSend (JSON)
InputJSON with an array attribute *list whore each element has the attributes supported by the send function.   
OutputNone (only via asynchronous callbacks)
ExamplemultiSend({‘ list’ : [{‘file’:’testPdf.pdf’, ‘channel’:’Upload’ , ‘call’:’onUpload’ },…]})

2.51 note (Samsung devices only)   (Android) #

Enables the creation of handwritten notes or drawings on supported Samsung devices during wizard execution. Up to four pages of notes or drawings can be created.

Notes are initially saved in a proprietary SPD format and stored on the device as PNG images in the specified folder. If a PDF output is required, the jpgToPdf function can be used to convert the images into a PDF document.

Function note (JSON)
InputJSON object with attributes:   call – function to call after notes creation is finished srcFilePath – path to a source spd file / source spd file name savePath – name of the folder specified to store created notes in a png format. It is a folder as there can be up to 4 notes created color – allows set the color of the action bar at the top of the screen
Outputspd and png files
Examplenote{‘call’:’onNote’,’srcFilePath’:’example.spd’,’savePath’:’ tmp’, ‘color’ : ‘#ff4000’}

2.52 onSystem (Android) #

This is not a function that your JavaScript code should call, on the contrary, this is a function that Signatus calls when some system events occur.

The list of system events:

  • a document is successfully uploaded (code 72),
  • a document failed to upload (code 73),
  • document upload requires authentication (code 74).

If you do not define this function, a default implementation is used that only logs the event to the logs.

Function onSystem (JSON)
InputJSON String with with attribute param that is a JSON object with attributes: code –  type of event, data – detailed information about the event
OutputNone (only via asynchronous callbacks)
Examplefunction onSystem (data) {     var parameterJson = JSON.parse(data);     var json = parameterJson.parameter;     if (72 == json.code) {         if (json.data.cout == 0) {             // all uploads successfully finished …

2.53 openPreferences (Android) #

Opens the Signatus preferences window. If Signatus is configured to launch directly into a wizard, this function allows administrators to access and modify application settings without stopping the wizard.

function openPreferences (JSON)
Inputnone
Outputtrue if successful, false if failed
ExampleopenPreferences ({})

2.54 openWeb (Android) #

Enables to display a web page in a wizard via embedded browser. It is possible to use the information available online and display within the wizard and combine with the process of the wizard or information available in the wizard.

Besides displaying the web content, it is possible to download a file available on web. After the user selects a file to download, the control will return to the wizard to process the file.

function openWeb (JSON)
InputJSON object with attributes:   *url – URL of the web page to view, sso – if true, requests to authenticate (Microsoft NTLM) from the web site will be served transparently using stored username and password (see saveAuthentication), default is false, logOutUrl – if sso is true, logout url defined can be used to log out current user (logOutUrl=”logout.ashx”) keepCookies – if true, cookies from the server will be kept for the subsequent openWeb invocations, default is false, showProgress – if true, a progress animation will be shown until the web page is fully loaded, default is true, savePath – directory to save the downloaded files, call – function to call after downloading a document. color – allows set the color of the action bar at the top of the screen
OutputNone
ExampleopenWeb ({‘url’: ‘http://myweb.com’, ‘downloadPath’: ‘temp’, ‘call’: ‘onWebDownload’, ‘keepCookies’: ‘true’, ‘color’ : ‘#ff4000’ })

2.55 openCustomTabs (Android) #

Enables to display a web page in a wizard via Chrome Custom Tabs.

function openWeb (JSON)
InputJSON object with attributes:   *url – URL of the web page to view, color – allows set the color of the action bar at the top of the screen
OutputNone
ExampleopenCustomTabs ({‘url’: ‘http://myweb.com’, ‘color’ : ‘#ff4000’ })

2.56 postRequest (Android) #

Executes an HTTP POST request (with JSON data) to the server specified in an upload channel configuration. Returns server response as a string. The request is encoded as multipart/form-data.

function postRequest (JSON)
InputJSON with String attributes: *id – string sent as a separate form field of multipart/form-data named “id”, *postData – string as a form field of multipart/form-data named “data”, *channel – channel whose “REST upload URL” is used for the request,  *call – function to call when response is received from the server.
OutputNone
Example        let data = {};         data.reason = “clear”;         data.state = “todownload”;         data.type = “O”;           let arg = {};         arg.id = “112233”;         arg.data = JSON.stringify(data);         arg.channel = “Rules”;         arg.call = “onServerClearToDownload”;         postRequest(arg); Makes a POST request using the URL configured for the upload channel “Rules”. The function receiving the server response: function onServerClearToDownload (sResult) {     let result = JSON.parse(sResult);     if (“ERROR” === result.parameter.status) {               // handle error     } }

2.57 preview (Android, iOS) #

Previews a PDF Document without a possibility to sign or modify the document.

function preview (JSON)
InputJSON with String attribute:  *path color – allows set the color of the action bar at the top of the screen
OutputNone
Examplepreview ({‘path’: ‘TrialRequest.pdf’, ‘color’: ‘#ff4000’ }) Displays TrialRequest.pdf file.

2.58 printBon (Android) #

Provides possibility to add payment operations within a wizard in connection with a supported fiscal printer. At the moment, the supported printer is Verizone VX675 FiskalPRO printer.

Parameters:

printerType: VX675

action: payment / storno / cancelDay

contractNumber: a contract number

amount: payment amount

cardPayment: true / false

port: printer port (default 6090)

timeout: socket connection timeout (default 3000)

bonType: 1 (at present only  bon type 1 is supported)

Function void printBon (JSON)
InputJSON with attributes: data – JSON object with necessary information about the payment, call – callback Javascript function name.
OutputNone
ExampleprintBon ({‘data’ : {‘contractNumber’ : ‘CN-123’, ‘amount’ : ‘137.42’ }, ‘call’ : ‘onPayment’})

2.59 rename (Android) #

Changes the name of the defined file.

Function JSONArray rename (JSON)
InputJSON with String attributes:    *path – old file name, *name – new file name.
Outputtrue / false
Examplerename ({‘name’: ‘newDoc.pdf’, ‘path’: ‘data/oldDoc.pdf’})

2.60 retrieveDocumentMetadata (Android) #

Retrieves metadata collected during the signing ceremony. This metadata includes the state of the document’s AcroForm fields, such as which checkboxes were selected and which signature fields were completed.

The retrieved data can be used to monitor the signing process and to prevent document submission if required fields have not been filled in or signed.

function retrieveDocumentMetadata (JSON)
InputEmpty JSON
OutputJSON object
ExampleretrieveDocumentMetadata ({}) Retrieves document metadata of the last signed document, e.g. {“documentMetadata” : {“fieldName1” : {“value”:”abc”, “time” : “1499951775”}, …}}

2.61 saveAuthentication (Android, Windows, iOS) #

Stores a username and password in the application’s authentication holder for use in subsequent REST requests. The validity period of the stored authentication can be configured in the application settings.

If the function is called with empty credentials, all previously stored authentication data and cookies are cleared. This effectively performs a logout, with an optional logout request sent to the server.

The logout request is sent only if the channel parameter is specified. Logout is performed using an HTTP GET request, where the logout URL is derived from the channel’s configured login URL by replacing the login path segment with logout.

Function boolean saveAuthentication (JSON)
InputJSON with String attributes *user – username to remember (empty for logout), *password – password to remember (empty for logout), *channel – channel to logout.
Outputtrue if user name and password are successfully stored, false otherwise
ExamplesaveAuthentication ({‘user’ : ‘somebody’, ‘password’ : ‘secret’})

2.62 saveText (Android, Windows, iOS) #

Creates a text file containing the text passed in as a JSON string.

Function Boolean saveText (JSON)
InputJSON with String attributes:   *file, *text
Outputtrue / false 
ExamplesaveText ({‘file’: ‘scan/data.txt’, ‘text’: ‘DATA in txt file’}) Value of the ‘text’ attribute will be saved in a new file called ‘data.txt’ in the ‘scan/’ folder.

2.63 saveToDevice (Android) #

Saves a file to the internal storage of the device. Deprecated method, not recommended to use when the workflow in SIGNATUS is started and controlled by a wizard ZIP file.

Function JSONArray saveToDevice (JSON)
InputJSON with String attributes:    *path – source file path, *name – destination file name, *parameter – “save” means document will be overwritten, “saveAs” means a new document is created (“name” must be specified).
OutputJSON result object (OK or error)
ExamplesaveToDevice ({‘name’: ‘TrialDoc.pdf’, ‘path’: ‘data/TrialRequest.pdf’, ‘parameter’: ‘saveAs’}) e.g. {“status”: “OK”} or {“status”: “ERROR”, “message”: “…”}    

2.64 saveToLocalChannel (Android) #

Saves a file to a local channel directory (in settings labeled as a “Browse device storage”).

Function saveToLocalChannel (JSON)
InputJSON with String attributes:    *path – source file path (including filename), *filename – destination file name, *channel – name of the local channel, *data – metadata, *call – function to call after copying the file
OutputJSON result object (OK or error)
ExamplesaveToLocalChannel ({ ‘filename’: ‘TrialDoc.pdf’, ‘path’: ‘data/TrialRequest.pdf’, ‘channel’: ‘Local’, ‘call’: ‘onPrepareFile’, ‘data’: {…} }) e.g. {“status”: “OK”} or {“status”: “ERROR”, “message”: “…”}    

2.65 scan (Android) #

Calls the scan activity and when the scan is complete, the image is saved as a JPEG file in the specified folder. If a callback function is defined, it is called when the scanning is finished.

function String scan (JSON)
InputJSON with String attributes:    *folder – folder to store the scanned image, file – name of file to store the scanned image, call – callback function name.
OutputReturns the full file path of the JPEG scan.
Examplescan ( {‘folder’: ‘scan’} ) Creates a JPG image in the folder ‘scan/’.

2.66 scanLicense (Android) #

Opens a barcode reader to scan QR license code. After scanning, it connects to the license server and downloads the license and all the related configuration files available.

function String scanLicense (JSON)
InputJSON with String attributes:    * call – callback function name.
OutputReturns String in JSON format to callback method. JSON contains parameter success = true if is downloaded a valid license , otherwise success = false
ExamplescanLicense ( {‘call’: ‘onScanLicense’} )

2.67 send (Android, Windows, iOS) #

Submits the file to a configured REST upload channel.

function send (JSON)
InputJSON with String attributes:   *file – name of the file to upload, channel – name of the channel to use for uploading (if not specified and more than one channel has been defined in the settings, it prompts the user with a dialog window), saveChannel – if specified,the uploaded file is read from the directory of the local channel instead of the wizard workspace (avoids the need to copy a file from local channel to workspace for example if signing is done on the server), filename – required if “saveChannel” is specified – the name of the file from the local channel to upload, call – callback function that is be called upon package acceptance by the uploader with the value of the ‘data’ parameter as input, data – additional data for the uploader in JSON format, upload – true (default value) = file is prepared for upload and uploader is called immediately, false = file is only prepared for upload, the uploader can be started later using the ‘upload’ function.
OutputNone
Examplesend ({‘file’: ‘final/zxc.zip’ , ‘ channel’: ‘DMS1’, ‘upload’: ‘true’, ‘data’:{‘contractNumber’ : ‘8954’, ‘customer’ : ‘Anasoft’}) submits file zxc.zip in the ‚final‘ folder to uploader with channel name ‚DMS1‘

2.68 sendAck (Android, Windows, iOS) #

Sends metadata about the state of the document (e.g. “signed” in order to acknowledge that the document has been signed and can be removed from the list of documents available for signature).

Function void sendAck (JSON)
InputJSON with String attributes:    *state – “download” (document has been downloaded), “cancel” (document signing has been cancelled), “open” (document has been opened) or some custom state value understood by the server, call – callback function name, id – document unique ID, user – user name for server authentication, password – password for server authentication.
OutputNone
ExamplesendAck({‘channel’:’-1′,’state’:’ping’,’data’: ‘time’, ‘id’ : ‘789555’})

2.69 sendLog (Android, Windows, iOS) #

Collects all Signatus application log files available on the device (stored in the Log folder), packages them into a ZIP file, and uploads the archive using a selected upload channel configured in the application settings. This allows users to easily send log files from the device through an action triggered in the wizard when troubleshooting is required.

Note: When using an MDM solution, logs can be collected automatically without requiring user interaction.

Function sendLog (JSON)
InputJSON with String attributes:    channel – name of the channel to be used for uploading the log files (if not specified and more than one upload channel has been configured in settings, it will prompt the user with a dialog window to select the upload channel), filename – name of the file to be uploaded, docType – if set to „*“, the log package will include the OS-level logs (logcat), data – additional data in JSON format.
OutputZip file
ExamplesendLog({‘filename’:’Log_’+getInfo({‘code’:’SerialNumber’})+’_’, ‘channel’: ‘LOG_CHANNEL’ , ‘data’ : {‘info’ : ‘logFile’}});

2.70 setAppConfig (Android, Windows) #

Sets an internal SIGNATUS configuration parameter (not reachable via GUI). This way it is possible to customize the Signatus application from the wizard. Contact us in order to get the desired parameter and possible values to be set.

Example of configuring the generated certificate issuer name (instead of the default value CN=SIGNATUS,O=Anasoft APR,L=Bratislava,ST=Slovakia,C=SK) below:

function setAppConfig (JSON)
InputJSON with String attributes:  *code, *data
Outputtrue/false
Examplevar v = “CN=sig,O=abc s.r.o,L=Bratislava,ST=Slovakia,C=SK”; setAppConfig({‘code’:’cert.issuer.name’, ‘data’: ‘v’} );

* implementation for Windows is limited for some attributes only (“tag.compulsory.signatures”, “document.zoom.factor”, “cert.issuer.name”)

2.71 setLogLevel (Android, Windows, iOS) #

Sets the level of wizard logger.

Log level:

  • 3- debug
  • 6- error (default)

Note: The API allows to log events that happen in the wizard into the application log for possible debugging or auditing. The HTML wizard logs are created on daily basis in the following local (device storage) folder:

\Android\data\com.anasoft.signatus.app\files\LogJS\{DATE}.log

function setLogLevel (integer)
Input*integer
OutputNone
ExamplesetLogLevel (3)

2.72 setProfile (Android) #

Set a value of an item inside “My Profile” section of Signatus application installed on the device.

function Boolean setProfile (JSON)
InputJSON with String attributes:   *code – profile attribute key (default keys are: p_firstname, p_lastname, p_email, p_phone, p_company), *data – attribute value.
OutputTrue / false
ExamplesetProfile({‘code’: ‘ firstname ‘, ‘data’: ‘Lukas’}) Sets the value “Lukas” in the device profile attribute ,firstname’.

2.73 setProgress (Android) #

Sets the value of the progress indicator displayed in the Android system task bar during wizard execution. The progress bar shows the current wizard step and the total number of steps to be completed.

Function void setProgress (JSON)
InputJSON with integer attributes:  progress* and max*
OutputNone
ExamplesetProgress({‘progress‘: 1 , ‘ max‘ : 5})

2.74 setSettings (Android, Windows, iOS) #

Sets one of the SIGNATUS configuration parameters that are also reachable via the settings GUI. This way it is possible to customize the settings of Signatus application from the wizard.

See the getSettings function for the list of codes.

Function void setSettings (JSON)
InputJSON with String attributes: *code – key identifying the settings entry, *data – new value to set (string or boolean, depending on the parameter).
OutputBoolean true if the configuration change was successful.
ExamplesetSettings({‘code’:’browse_rest_username’, ‘data’: ‘userName‘})

2.75 setSystem (Android) #

Sets a system dependent property. Suitable to be used when there is a need to give a permission to Signatus application running a wizard.

Function void setSystem (JSON)
InputJSON with String attributes: *code – int key identifying the callback entry, *name – name of system property *data – new value to set (string,Boolean, JSONArray, depending on the name parameter).
OutputCallback to onSystem javascript function.
Implemetationname : permissions, data : array of android permissions keys – Provide request to permissions on Android 6.0 and higher.
ExamplesetSystem({‘code’:1001, ‘name’: ‘permissions’,data’: [‘ android.permission.ACCESS_FINE_LOCATION’, ‘ android.permission.ACCESS_COARSE_LOCATION’]})

2.76 setTitleBar (Android) #

Sets the text and color of the Android title bar of a wizard.

Function void setTitleBar (JSON)
InputJSON with String attributes: *text and *color
OutputNone
ExamplesetTitleBar({‘text’: ‘Wizard title’, ‘color’ : ‘#0F6BAC’})

2.77 signPdf or signePdf (Android, Windows, iOS) #

Invokes the signing activity for the specified PDF document and saves the signed document under the given filename. Callback functions and custom parameters can also be defined.

The allowedFields parameter restricts the signing session to a specific set of AcroForm fields. This is useful in multi-step or multi-signer workflows, where each signer should see and interact only with the fields assigned to them. The parameter is provided in JSON format and supports SIGNATURE, TEXT, CHECKBOX, and RADIO field types. If allowedFields is not specified, all AcroForm fields are displayed and available for signing. Both function names, signPdf, and signePdf are supported.

The allowedButtons parameter defines which action buttons are displayed during the signing ceremony.

The config parameter allows further customization of the signing process, such as defining whether the document must be read or signed, specifying signature fields for which biometric data should not be captured, and enabling or disabling calculation of a signature hash for audit purposes.

The savePngPath parameter enables saving an image of each handwritten signature as a PNG file in the wizard workspace. The PNG file name matches the name of the AcroForm signature field where the signature was applied.

function signPdf (JSON)
InputJSON with String attributes:   *path, *savePath, savePngPath, call, parameter, progress, max, allowedFields, color – allows set the color of the action bar at the top of the screen allowedButtons – JSON Array with displayed buttons ids. Example : [‘action_canceled’, ‘action_ok’, ‘action_save’]. nativeMenu – native  action bar button configuration. JSON Array of object with keys:         id – id of button         title – button title        icon – path to a png file or REMOVE to remove deafult icon         color – button text colorExample :  ‘nativeMenu’ :[
   {
      ‘id’ : ‘action_ok’,
      ‘title’ : SAVE AND CLOSE’,
      ‘icon’ : “REMOVE”,
      ‘color’ :‘#ffffff’
  
},
   {
      ‘id’ : ‘action_canceled’,
      ‘title’ : ‘CANCEL’,
      ‘icon’ : “REMOVE”,
      ‘color’ :‘#ff0000’
  
}]  config – JSON Object with keys:          captureBiometry – white list array of signature fields names, biometric characteristics are captured for all signature fields by default         method – read (mandatory to read the document and scroll all the way down to the bottom of the document)/ write (mandatory to sign) / optional        auditHash – true / false adds audit hash to digital signature        signerInfo – JSON Object with signer info per acrofield. Signer info will be displayed under hand written signature. Example : “config”: {                              “signerInfo”: {                                            “acrofieldName1”: [“John Smith”],                                            “acrofieldName2”: [“Thomas Deer”]                              }               }
OutputNone or callback(parameter) For Example: {“parameter”:”true”} Or {“parameter”:”cancel”}
ExamplesignePdf ({‘path’: ‘TrialRequest.pdf’, ‘savePath’: ‘up_TrialRequest.pdf’, ‘progress’: 3, ‘max’: 4 , ‘color’ : ‘#ff4000’, ‘allowedFields’ : {‘SIGNATURE’ : [‘Sig1’, ‘SC_’]}}) opens TrialRequest.pdf and saves the signed version as ‚up_TrialRequest.pdf‘ if signed

2.78 startApplication (Android) #

Starts another application installed on the same device, e.g. launching a digital signage application broadcasting promotional videos after the document has been signed and the wizard has completed.

Function void startApplication (JSON)
InputJSON with String attributes:    *name – the package name of the Android application to start, call – the function to call asynchronously with the result of the operation (OK or ERROR).
OutputNone
ExamplestartApplication({‘name’:’com.application.package‘})

2.79 unGzip (Android) #

Decompresses a file using the GZIP compression.

function unGzip (JSON)
InputJSON with String attributes:   *name – the GZ file to decompress, *file – path to the destination (decompressed) file.
Outputtrue if successful, false if failed
ExampleunGzip ({‘name’: ‘abc.gz’,’file’: ‘abc.pdf’}) Decompresses the file ‘abc.gz’ to ‘abc.pdf’.

2.80 unZip (Android, Windows, iOS) #

Unzips the file using the standard ZIP compression into the supplied path.

function unZip (JSON)
InputJSON with String attributes:   *file – the ZIP file to unpack, *path – destination folder, password – optional (if the archive is encrypted).
OutputNone
ExampleunZip ({‘file’: ‘abc.zip’,’path’: ‘data’,’password’: ‘123’}) Unzips the file ‘abc.zip’ into path ‘data/’ with password ‘123’.

2.81 updateFile (Android, Windows, iOS) #

Updates a file or files that have been downloaded from the license server to the device at the activation of Signatus license.

The argument “state” specifies the type of the file:

  • “local” – template PDF files or wizards available in a local channel,
  • “form” – simple (non-wizard) HTML forms,
  • “files” – configuration files (certificates etc.),
  • “profil” – user profile.

This function also allows the wizard to update itself. Using this function, new version of the wizard or configuration updates can be distributed to all the devices of the customer. In case multiple files should be checked and updated, please use the function according to the example for update of multiple files.

Function void updateFile (JSON)
InputJSON with attributes: filename – name of the file to be updated, state – type of file to be updated (default is “local”),   for multiple files filenames – names of the files to be updated. In case of download or update of multiple files state is ignored   showProgress – if true, a progress dialog will show during file downloading, restartAfterUpdate – if true, a restart dialog will show after the file is successfully downloaded.
OutputNone
Example for one file onlyupdateFile ({‘filename’ : ‘Wizard.zip’ , ‘showProgress’ : true, ‘restartAfterUpdate’ : true , ‘call’ : ‘onUpdate’})
Example for multiple filesfunction updateFile() {     let arg = {};               arg.showProgress = true;     arg.restartAfterUpdate = true;     arg.call = “onUpdatePreferences”;               arg.filenames = “public.der,example.pdf,logo.png”;               updateFile(arg);

2.82 upload (Android, Windows, iOS) #

Starts the file upload service.

Function boolean upload (JSON)
InputJSON with String attributes: login “show” (default value) – if authentication is required for upload service, application show native authentication dialog,“propagate” – propagate authentication required information to callback function, call – callback Javascript function name.
OutputNone
Exampleupload ({‘login’ : ‘propagate’, ‘call’ : ‘onUpload’})

2.83 wakeLock (Android) #

Enables or disables the system wakelock via the OS Power Manager. When the wakelock is enabled during a wizard, the device remains awake and the screen does not dim. This is useful for multi-step signing workflows, as it prevents the device from entering sleep mode before the wizard is completed.

Function void wakeLock (JSON)
InputJSON with String attribute:   *data
Outputtrue/false
ExamplewakeLock ({‘data’: ‘on’})

2.84 zip (Android, Windows, iOS) #

Creates a ZIP package from the files in the specified folder, optionally encrypting the ZIP with the provided password.

function zip (JSON)
InputJSON with String attributes:  *file, *folder, password
OutputNone
Examplezip ({‘file’: ‘zxc.zip’,’folder’: ‘scan’}) creates package ‘zxc.zip’ with files in folder ‘scan/’

2.85 oidcLogin (Android) #

Establish a login session with the OAuth server configured in the envelope channel. Upon successful authentication, save the username and password to the channel settings to eliminate the need for the user to log in repeatedly.

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name  *user : user name *password : user password *call : callback function name
OutputProvide the callback function with user information from the access token in JSON format. Example : { “parameter”: { “status”: “OK”, “message”: “Login success”, “data”: { “given_name”: “John”, “family_name”: “Doe”, “email”: “john.doe@example.com”, “additional”: “sales”, “roles”: [ “default-roles-signatus”, “ROLE_USER” ] }, “code”: 200 } }  
ExampleoidcLogin({ channel: “signatus”, user: “username”, password: “secret”, call: “onLogin” });

2.86 oidcLogout (Android) #

Clears the user’s username and password from the settings and device. Additionally, the function terminates any existing OAuth session on the device

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name  *call : callback function name
OutputProvide the callback function about logout in JSON format Example : {“parameter”:{“status”:”OK”,”message”:”Logout success”,”data”:””,”code”:200}}
ExampleoidcLogout({ channel: “signatus”, call: “onLogout” });

2.87 envelopeCreate (Android) #

Creates envelope on Signatus Server

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name *data : envelope json data *file : arry of pdf file path  *call : callback function name
OutputProvide the callback function about envelope creation in JSON format Example : {“parameter”:{“status”:”OK”,”message”:””,”data”:””,”code”:200}}
ExampleenvelopeCreate({ data: JSON.stringify(envelopeJson), file: [“/pdf/Test_PDF.pdf”, “/pdf/Test_PDF1.pdf”], channel: “signatus”, call: “onCreateEnvelope” });

2.88 envelopeUpdate (Android) #

Updates envelope on Signatus Server

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name *data : envelope json data *file : arry of pdf file path  *call : callback function name
OutputProvide the callback function about envelope creation in JSON format Example : {“parameter”:{“status”:”OK”,”message”:””,”data”:””,”code”:200}}
ExampleenvelopeUpdate({ data: JSON.stringify(envelopeJson), file: [“/pdf/Test_PDF.pdf”, “/pdf/Test_PDF1.pdf”], channel: “signatus”, call: “onUpdateEnvelope” });

2.89 envelopeDelete (Android) #

Deletes envelope on Signatus Server

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name *id : envelope id  *call : callback function name
OutputProvide the callback function about envelope creation in JSON format Example : {“parameter”:{“status”:”OK”,”message”:”envelope.delete”,”data”:””,”code”:200}}
ExampleenvelopeDelete({id: “enevelopeid”, channel: “signatus”, call: “onDeleteEnvelope” });

2.90 envelopeList (Android) #

Gets envelope list from Signatus Server

function zip (JSON)
InputJSON with String attributes:  *channel : envelope  channel name or local channel name query : string with search criteria in query format  *call : callback function name
OutputProvide the callback function with JSONArray of enevlopes
ExampleenvelopeList({ query: “?type=inbox&createdFrom=03.06.2024T12:30”, channel: “signatus”, call: “onEnvelopelist” });

Updated on 07/01/2026
1. What is a Wizard
Table of Contents
  • Synchronous-to-asynchronous wrapper for Windows and iOS compatibility
  • 2.1 addJpgToPdf   (Android)
  • 2.2 alert (Android, Windows, iOS)
  • 2.3 alertD (Android, Windows, iOS)
  • 2.4 cancel (Android, Windows, iOS)
  • 2.5 clearWebView (Android)
  • 2.6 convertJSONtoXML (Android)
  • 2.7 convertXMLtoJSON   (Android)
  • 2.8 copy  (Android, Windows, iOS)
  • 2.9 createFolder (Android, Windows, iOS)
  • 2.10 createFolders   (Android, Windows, iOS)
  • 2.11 deleteFile (Android, Windows, iOS)
  • 2.12 deleteFolder (Android, Windows, iOS)
  • 2.13 deleteFolders (Android, Windows, iOS)
  • 2.14 deleteProfile (Android)
  • 2.15 download (Android, Windows, iOS)
  • 2.16 downloadList (Android, Windows, iOS)
  • 2.17 email (Android)
  • 2.18 exportSettings (Android)
  • 2.19 filesToJson (Android, iOS)
  • 2.20 formPdf (Android, iOS)
  • 2.21 getAppConfig (Android)
  • 2.22 getAuditLog (Android)
  • 2.23 getAuthentication   (Android, Windows, iOS)
  • 2.24 getChannels (Android)
  • 2.25 getFormFileName (Android)
  • 2.26 getInfo (Android, Windows, iOS)
  • 2.27 getLicense (Android)
  • 2.28 getMD5 (Android)
  • 2.29 getPdfInfo (Android)
  • 2.30 getPdfAuditData (Android, Windows)
  • 2.31 getProfile (Android)
  • 2.32 getQRcode (Android, iOS)
  • 2.33 getSettings (Android, Windows, iOS)
  • 2.34 getVersion (Android, Windows, iOS)
  • 2.35 gzip (Android)
  • 2.36 isAuthentication (Android, Windows, iOS)
  • 2.37 isDownloading (Android)
  • 2.38 isSrcFilePath (Android)
  • 2.39 jpgToPdf (Android)
  • 2.40 listDir (Android, iOS)
  • 2.41 loadAcroformData (Android, iOS)
  • 2.42 loadFile (Android, Windows, iOS)
  • 2.43 logAudit (Android)
  • 2.44 logD (Android, Windows, iOS)
  • 2.45 logE (Android, Windows, iOS)
  • 2.46 mergePdf (Android)
  • 2.47 move (Android, Windows, iOS)
  • 2.48 monitorRotate (Windows)
  • 2.49 multiDownload (Android)
  • 2.50 multiSend (Android)
  • 2.51 note (Samsung devices only)   (Android)
  • 2.52 onSystem (Android)
  • 2.53 openPreferences (Android)
  • 2.54 openWeb (Android)
  • 2.55 openCustomTabs (Android)
  • 2.56 postRequest (Android)
  • 2.57 preview (Android, iOS)
  • 2.58 printBon (Android)
  • 2.59 rename (Android)
  • 2.60 retrieveDocumentMetadata (Android)
  • 2.61 saveAuthentication (Android, Windows, iOS)
  • 2.62 saveText (Android, Windows, iOS)
  • 2.63 saveToDevice (Android)
  • 2.64 saveToLocalChannel (Android)
  • 2.65 scan (Android)
  • 2.66 scanLicense (Android)
  • 2.67 send (Android, Windows, iOS)
  • 2.68 sendAck (Android, Windows, iOS)
  • 2.69 sendLog (Android, Windows, iOS)
  • 2.70 setAppConfig (Android, Windows)
  • 2.71 setLogLevel (Android, Windows, iOS)
  • 2.72 setProfile (Android)
  • 2.73 setProgress (Android)
  • 2.74 setSettings (Android, Windows, iOS)
  • 2.75 setSystem (Android)
  • 2.76 setTitleBar (Android)
  • 2.77 signPdf or signePdf (Android, Windows, iOS)
  • 2.78 startApplication (Android)
  • 2.79 unGzip (Android)
  • 2.80 unZip (Android, Windows, iOS)
  • 2.81 updateFile (Android, Windows, iOS)
  • 2.82 upload (Android, Windows, iOS)
  • 2.83 wakeLock (Android)
  • 2.84 zip (Android, Windows, iOS)
  • 2.85 oidcLogin (Android)
  • 2.86 oidcLogout (Android)
  • 2.87 envelopeCreate (Android)
  • 2.88 envelopeUpdate (Android)
  • 2.89 envelopeDelete (Android)
  • 2.90 envelopeList (Android)
  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us
Proudly powered by WordPress