Signotec Signature Pad Api Documentation en
Signotec Signature Pad Api Documentation en
signoPAD API
Software components for communication with
signotec Sigma, Omega, Gamma, Delta and Alpha LCD pads
Version: 2.26
Date: 09.04.2019
© signotec GmbH
www.signotec.de
Tel.: (+49-2102) 5357-510
E-mail: [email protected]
Contents
LEGAL NOTICE 4
1 DOCUMENT HISTORY 5
2 FUNCTIONAL OVERVIEW 6
3 SYSTEM REQUIREMENTS 7
SIGNOPAD API COMPONENTS FOR WINDOWS 7
SIGNOPAD API COMPONENTS FOR JAVA 8
SIGNOPAD API COMPONENTS FOR LINUX 8
4 GENERAL INFORMATION ON THE SIGNOPAD API COMPONENTS 9
32- AND 64-BIT VARIANTS OF THE SIGNOPAD API 9
STPADCAPT.OCX 9
STPADLIB.DLL 10
STPADLIBNET.DLL 10
USING MULTIPLE INSTANCES 11
DATA FORMATS 11
SIGNDATA STRUCTURES 12
NOTES FOR REDISTRIBUTION 12
5 SIGNING AND ENCRYPTING USING SIGNOTEC LCD SIGNATURE PADS 14
SIGNING DOCUMENTS 14
SIGNING OF IMAGE CONTENT (CONTENT SIGNING) 16
6 DESCRIPTION OF POSSIBLE ERROR MESSAGES 18
7 INFORMATION ABOUT THE AVAILABLE IMAGE MEMORY 20
VOLATILE IMAGE MEMORY 20
NON-VOLATILE IMAGE MEMORY 21
COPYING BETWEEN IMAGE MEMORIES 23
THE TYPICAL PROCESS 23
THE STANDBY FEATURE 25
EXCLUSIVE USE OF NON-VOLATILE MEMORY 25
8 METHODS 27
DEVICESETCOMPORT METHOD 27
DEVICEGETCONNECTIONTYPE METHOD 30
DEVICEGETCOMPORT METHOD 32
DEVICEGETIPADDRESS METHOD 34
DEVICEGETCOUNT METHOD 36
DEVICEGETINFO METHOD 37
DEVICEGETVERSION METHOD 39
DEVICEGETCAPABILITIES METHOD 41
DEVICEOPEN METHOD 43
DEVICECLOSE METHOD 45
DEVICESETLED METHOD 46
DEVICEGETNFCMODE METHOD 48
DEVICESETNFCMODE METHOD 50
DEVICESTARTSERVICE METHOD 52
SENSORGETSAMPLERATEMODE METHOD 53
SENSORSETSAMPLERATEMODE METHOD 56
SENSORSETSIGNRECT METHOD 58
SENSORCLEARSIGNRECT METHOD 59
SENSORSETSCROLLAREA METHOD 61
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 2 of 226
SENSORSETPENSCROLLINGENABLED METHOD 62
SENSORADDHOTSPOT METHOD 64
SENSORADDSCROLLHOTSPOT METHOD 65
SENSORSETHOTSPOTMODE METHOD 68
SENSORCLEARHOTSPOTS METHOD 70
SENSORSTARTTIMER METHOD 71
SENSORSTOPTIMER METHOD 73
SIGNATURESETSECUREMODE METHOD 74
SIGNATURESTART METHOD 75
SIGNATURESTOP METHOD 77
SIGNATURECONFIRM METHOD 79
SIGNATURERETRY METHOD 80
SIGNATURECANCEL METHOD 81
SIGNATUREGETSIGNDATA METHOD 83
SIGNATUREGETISODATA METHOD 85
SIGNATURESAVEASSTREAM/SIGNATURESAVEASFILE METHOD 87
SIGNATURESAVEASSTREAMEX / SIGNATURESAVEASFILEEX METHOD 87
SIGNATUREGETBOUNDS METHOD 93
SIGNATURESCALETODISPLAY METHOD 96
DISPLAYERASE METHOD 98
DISPLAYERASERECT METHOD 99
DISPLAYCONFIGPEN METHOD 100
DISPLAYSETFONT METHOD 102
DISPLAYSETFONTCOLOR METHOD 103
DISPLAYSETTARGET METHOD 105
DISPLAYSETTEXT METHOD 108
DISPLAYSETTEXTINRECT METHOD 110
DISPLAYSETIMAGE / DISPLAYSETIMAGEFROMFILE METHOD 113
DISPLAYSETPDF METHOD 116
DISPLAYSETIMAGEFROMSTORE METHOD 118
DISPLAYSETOVERLAYRECT METHOD 120
DISPLAYSETSCROLLPOS METHOD 122
DISPLAYGETSCROLLPOS METHOD 123
DISPLAYSAVEIMAGEASSTREAM / DISPLAYSAVEIMAGEASFILE METHOD 125
DISPLAYSETSTANDBYIMAGE / DISPLAYSETSTANDBYIMAGEFROMFILE METHOD 129
DISPLAYCONFIGSLIDESHOW METHOD 132
DISPLAYCONFIGSLIDESHOWEX METHOD 134
DISPLAYGETSTANDBYID METHOD 136
DISPLAYSETBACKLIGHT METHOD 138
CONTROLSETLOGDIRECTORY METHOD 140
CONTROLGETVERSION METHOD 141
CONTROLERASE METHOD 142
CONTROLSETHOTSPOTMODE METHOD 143
CONTROLGETERRORSTRING METHOD 144
CONTROLSETSTPADLIB METHOD 145
CONTROLSETCALLBACK METHOD 146
CONTROLEXIT METHOD 148
RSAGENERATESIGNINGCERT/RSAGENERATESIGNINGCERTPW METHOD 149
RSASETSIGNINGCERT/RSASETSIGNINGCERTPW METHOD 151
RSASAVESIGNINGCERTASSTREAM / RSASAVESIGNINGCERTASFILE METHOD 155
RSASETHASH METHOD 158
RSACREATEDISPLAYHASH METHOD 160
RSACREATEHASHEDIMAGE METHOD 164
RSASIGN METHOD 167
RSASETENCRYPTIONCERT/RSASETENCRYPTIONCERTPW METHOD 170
RSAGETENCRYPTIONCERTID METHOD 173
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 3 of 226
RSAGETSIGNDATA METHOD 175
RSADECRYPTSIGNDATA METHOD 180
PDFLOAD METHOD 187
PDFGETPAGECOUNT METHOD 190
PDFGETWIDTH METHOD 191
PDFGETHEIGHT METHOD 193
PDFSELECTRECT METHOD 195
PDFADDIMAGE / PDFADDIMAGEFROMFILE METHOD 198
PDFREMOVEIMAGE METHOD 201
9 PROPERTIES 203
DEVICELEDDEFAULTFLAG PROPERTY 203
CONTROLVERSION PROPERTY 204
CONTROLAPPNAME PROPERTY 205
CONTROLBACKCOLOR PROPERTY 206
CONTROLRECTCOLOR PROPERTY 207
CONTROLPENCOLOR PROPERTY 207
CONTROLPENWIDTH PROPERTY 208
CONTROLMIRRORDISPLAY PROPERTY 209
DISPLAYWIDTH PROPERTY 210
DISPLAYHEIGHT PROPERTY 211
DISPLAYRESOLUTION PROPERTY 212
DISPLAYTARGETWIDTH PROPERTY 213
DISPLAYTARGETHEIGHT PROPERTY 214
DISPLAYSCROLLSPEED PROPERTY 215
DISPLAYROTATION PROPERTY 215
SIGNATURESTATE PROPERTY 216
SIGNATURESIGNDATA PROPERTY 218
10 EVENTS 219
DEVICEDISCONNECTED EVENT 219
SIGNATUREDATARECEIVED EVENT 220
SENSORHOTSPOTPRESSED EVENT 222
SENSORTIMEOUTOCCURED EVENT 224
DISPLAYSCROLLPOSCHANGED EVENT 225
Legal notice
All rights reserved. This document and the components it describes are products copyrighted
by signotec GmbH, based in Ratingen, Germany. Reproduction of this documentation, in part
or in whole, is subject to prior written approval from signotec GmbH. All hardware and
software names used are trade names and/or trademarks of their respective
manufacturers/owners. Subject to change at any time without notice. We assume no liability
for any errors that may appear in this documentation.
The signoPAD API contains visual and non-visual interfaces, allowing programmers to
implement a wide range of functions for capturing electronic signatures and displaying
graphics, text and buttons on a signotec LCD pad. The ‘STPad’ components all offer virtually
the same range of functions – except for the display on the PC screen – and differ mainly in
the technology used (COM, .NET Assembly, Native DLL). The ‘STPadLib.dll’ component does
not contain a visual control element and can therefore not be used directly to display
signatures in real time on a PC screen.
The following table provides an overview of the components included in the signoPAD API.
Notes: The STPad.dll component contained in the signoPad API 8.0.18 or earlier is no longer
required. The signoReset, signoImager 2 and signoIntegrator 2 applications, which were
included in signoPAD-API 8.0.25 or earlier, are now included in the separate signoPAD Tools
setup, which can be downloaded free of charge from www.signotec.de.
The signoPAD API for Windows can be run on all Windows versions as of Windows 7. It was
tested under the following systems and development environments:
- Windows 7
- Windows 8
- Windows 8.1
- Windows 10
- Microsoft Visual Studio 2010 Professional Edition
- Microsoft Visual Studio 2012 Professional Edition
- Microsoft Visual Studio 2013 Professional Edition
- Microsoft Visual Studio 2015 Professional Edition
- Microsoft Visual Studio 2017 Professional Edition
- CodeGear Delphi 2007 Professional Edition
- Embarcadero Delphi XE Architect Edition
3.1.1 Dependencies
The components, applications and their dependencies respectively contained in the signoPAD
API sometimes require different versions of the Microsoft C++ libraries and / or the
Microsoft.NET framework. The following provides you with an overview of the libraries that are
required in each case (depending on the set-up variant for the x86 or x64 platforms):
The signoPAD API Setup automatically installs the ‘Visual Studio 2010 Redistributables’,
‘Visual Studio 2017 Redistributables’, and .NET 4 Client Profile.
.NET 2.0 is not included in the signoPAD API and must be manually installed if necessary.
All other components of the signoPAD API do not require .NET Framework.
The COM wrapper in Visual C++ does not support the optional parameters of STPadCapt.ocx.
In order to be able to use this feature, the wrapper class must be changed manually, for
example for DeviceOpen () as in the following example:
3.1.2.2 Multithreading
STPadCapt.ocx must run in the ‘Single Threaded Apartment’ (STA). If the STPadCapt.ocx shall
be used in an MTA application, you should create an STA Form including the STPadCapt.ocx
and call this as a modal dialog from your application.
Current versions of Visual Studio generate COM wrappers in projects with .NET 3.5 or earlier
for .NET 4.0, causing run-time errors. This also applies to the included sample projects for the
STPadCapt.ocx.
Please use Visual Studio 2010 if you want to use the STPadCapt.ocx in a .NET application with
.NET 3.5 or earlier.
STPadLibNet.dll has used .NET 4.0 since version 8.1.4. Older .NET versions are no longer
supported. However, this also means that the .NET 2.0 runtime activation policy no longer
needs to be enabled in .NET 4.0-based projects. The changes previously necessary to the
‘app.config’ file within the project are no longer required and may be reversed, if necessary.
Please use signoPAD API Java, which you can download for free on our website.
Please use the signoPAD API Linux. Please speak to your signotec contact if you are
interested.
One of the ‘STPad’ components is required to activate a signotec LCD pad. The required
functionality and technology used determine which component is chosen. For further details,
see the following sections.
The signoPAD API is available in both x86 (32-bit) and x64 (64-bit). Windows 64-bit allows for
the parallel installation of both set-ups.
The x86 version only contains components and applications that were compiled for the x86
platform. But both the set-up and all the components and applications can also be used on
32-bit and 64-bit versions of Windows.
The x64 version only contains components and applications that were compiled for the x64
platform. Some demo applications are only compiled for x86 and are not included in this
release. Both the set-up and all the components and applications can only be used on 64-bit
versions of Windows.
Since the two versions of the components differ neither in name nor in the interface, only one
version has to be referenced. For different reasons, if you are developing using Visual Studio,
it is recommended that you use the respective x86 version from the 32-bit set-up during
development. The appropriate component for the target platform at hand must be used in the
implementation. The following table shows which version of the components must be used for
specific operating system or application versions:
STPadCapt.ocx
This OCX must be registered in the system using regsvr32 so that all applications access the
same component. The WoW64 technology from Microsoft allows for the parallel installation
and registration of the x86 and x64 versions of OCX.
Generally speaking, the control element is embedded in a window during development; most
development environments will then automatically ensure correct initialisation. However, it is
also possible to generate the element at runtime; the CreateControl() method is available in
this case. For details, please see the Microsoft documentation for ActiveX components.
STPadLib.dll
STPadLib.dll is a native and dynamically loadable library (DLL). A C header file (STPadLib.h)
and a library file (STPadLib.lib) are included. This DLL can be used both statically and with
dynamic linking; it can therefore be used in all common development environments.
Initialisation is performed automatically as soon as the DLL is activated; before it is unloaded
again, the STControlExit() method must be called to release resources used internally.
This component should be used if there is no window available in which a visual control
element can be embedded, or if no real-time display is required. It is also very suitable for a
simple program without user interface that only checks, for example, whether signotec pads
are connected. The STPadLibNet.dll component should be used for .NET applications.
The DLL cannot be registered in the system, but must be in the application’s search path at
runtime. Various applications can therefore access various versions of the DLL.
When STPadLib.dll x86 is used with a programming language that uses the stdcall calling
convention (for example, Visual Basic 6), methods must be used that are also exported with
stdcall. These methods have the additional suffix ‘_stdcall’ (for example,
STDeviceGetCount_stdcall()), but are otherwise no different from the methods exported
with cdecl.
STPadLibNet.dll
The STPadLibNet.dll is a .NET class library. It can be used in all common .NET-compatible
development environments. All classes, enumerations, etc., are contained in the
signotec.STPadLibNet namespace.
This component should be used if .NET is used for development purposes. It contains a non-
visual as well as a visual (Windows Forms Control) class. The two classes can also be
combined.
The DLL is signed with a ‘strong name’ and may be registered in the ‘Global Assembly Cache’
(GAC). However, if the DLL is located in the search path of the application, this version will
always be used. The assembly version will only change if the interface is changed and may
therefore differ from the file version.
The STPadLib class is designed for communicating without a visual control element. Only the
non-visual methods, properties and events are therefore available.
The STPadCapt.ocx and STPadLibNet.dll classes can be instantiated more than once. If
multiple instances of a class are used in different memory areas (for example, different
programs), these instances are completely independent of each other and there is nothing
else to be aware of.
If multiple instances of a class are used in the same memory area, please note the following:
- When DeviceGetCount() is called, it is valid for all instances and therefore only needs to
be executed in one instance.
- If a connection to a device has already been opened by an instance, only the previously
determined value is returned when DeviceGetCount() is called in another instance, i.e., no
new search is carried out.
Data formats
The data formats of the individual components vary according to the technology used. The
STPadCapt.ocx component uses only OLE-compliant and COM-compliant data types for
complex data structures (VARIANT, BSTR, etc.), while the STPadLib.dll uses types such as
BYTE and LPCWSTR and the STPadLibNet.dll uses byte and string.
SignData structures
The signoPAD API components can return a captured signature as a data structure in two
different SignData formats. Both formats are encrypted, compressed, biometric structures
that can be stored in a database or as a tag in a TIFF or PDF document.
The conventional SignData format is encrypted symmetrically and can therefore be unpacked
again and visualised by other signotec components. The new RSA encrypted SignData format
is currently only supported by signoPAD API components and must be converted into the
conventional format where required using the RSADecryptSignData() method. Users of the
RSA-encrypted format must have the appropriate private RSA key otherwise the data cannot
be decrypted.
A separate API (signoAPI) is available for the (ISO-compliant) signature of PDF and
TIFF documents. This API includes a wide range of functions for PDF management
along with much more. Please contact your signotec contact if you are interested.
Conventional SignData structures can be visualised in real time using the signview.dll
component from the signoAPI. The component is included as a demo version; the full version
is included in the signoAPI.
The signoPAD-API setup may be installed with the ‘silent’ flag set. For details, please see the
‘signoPAD API Installation Guide,’ which can be found in the Download area at
www.signotec.com.
You can, of course, redistribute individual files from the signoPAD API in a separate Setup.
Essentially, only the ‘STPad’ component used by your application, possibly the STPad.ini and
STPadStores.ini files, and, depending on the component used, Microsoft Runtime and/or
Framework files, are required to support the signotec Sigma, Omega, Gamma, Delta and
Alpha LCD signature pads. See also chapter ‘Dependencies’. If your application uses the
STPadCapt.ocx component, it must be registered in the system using regsvr32.
The signotec LCD Sigma (from firmware 1.16), Omega (from firmware 1.25), Gamma, Delta
and Alpha signature pads offer various options to encrypt or sign data with RSA keys. The
biometric data of a signature captured with a device can be encrypted to prevent this
extremely sensitive data from being manipulated. Hash values can be signed to prove the
integrity of data. These hash values can be transferred to the signature device in the form of
a SHA-1 or SHA-256. Alternatively, however, the device can calculate the SHA-1, SHA-256 or
SHA-512 values itself using the displayed screen content.
In the case of advanced signatures using signotec pads, the signer is only a temporary owner
of the signature certificate, which is stored in the signature device. While the signer is not the
actual owner, at the moment of signing the signer is the holder of the certificate, which
satisfies the requirements of the Signature Act. However, the signature cannot be assigned to
the signer using the signature certificate; rather, it must be assigned based on the biometric
characteristics of the signature. For this reason, this biometric data must be afforded special
protection, comparable to the protection of a signature certificate and PIN in the case of a
qualified electronic signature.
signotec pads provide this protection by enabling the encryption of this sensitive data with a
public RSA key. Only the owner of the related private key is able to decrypt the biometric
data. Therefore, it is recommended that this private key be stored in a trustworthy place
(e.g., with a notary) and that it is only used when the identity of a signer must be
authenticated by a handwriting expert (e.g., before a court).
In addition, the signotec pads offer a procedure that enables the inseparable assignment of
biometric data to the signed document or image content. The unsigned document or the
image displayed on the signature device can be signed on the signature device in the form of
a hash value combined with the hash value of the biometric data. It is not technically possible
to sign another document using the identical biometric data in the same signature device.
The following section describes two typical scenarios in which data is encrypted and signed.
The sample code is written in C# and uses the STPadLibNet.dll component; the code is similar
for other languages and components.
Signing documents
First, the hash value of the document to be signed must be calculated (hereafter referred to
as hash 1). The SHA-1 and SHA-256 procedures are permissible for this purpose. Before
signing begins, the hash value must be transferred to the signature device (prior to this, of
course, the connection must be established with the pad and the desired image content
displayed; these steps are not listed in the sample code):
try
{
stPad.RSASetHash(hash1, HashAlgo.SHA256, HashFlag.None);
stPad.SignatureStart();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Calling SignatureStart() starts the process of capturing the signature. Hash 1 is then
encrypted and entered in the biometric data; once the signature has been captured, hash 1
can be digitally signed with the hash value of the biometrics (hereafter referred to as hash 2).
Once the signature has been captured, the capturing process must be completed as usual
using SignatureStop() or SignatureConfirm().
Hash 1 and hash 2 can now be linked and signed. It is recommended to use the RSASSA-PSS
signature scheme; alternatively, a padding can also be used without a hash OID in accordance
with RSASSA-PKCS1-V1_5. This step can be skipped. However, in this case, it will only be
possible to retrospectively check that hash 1 is correct by decrypting the biometric data.
byte[] signData;
try
{
signData = stPad.RSAGetSignData(SignDataGetFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
The signature (signature) and the biometric data (signData) must then be integrated into
the document. While this means the document is signed, it has not yet been provided with an
advanced electronic signature. To do this, the entire document must be digitally signed again
in the form of a hash value (hereafter referred to as hash 3). If the document is signed
according to PKCS#1, the public certificate to verify the signature must be collected from the
pad in addition to the signature:
Alternatively, the signature can also be created in the PKCS#7 format, which already contains
the public certificate. The following method is recommended when signing PDF documents
according to the so-called DigSig standard:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 15 of 226
byte[] signature = null;
try
{
stPad.RSASetHash(hash3, HashAlgo.SHA256, SignFlag.None);
signature = stPad.RSASign(RSAScheme.PKCS1_V1_5, HashValue.Hash1,
HashFlag.PKCS7);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
In the case of a DigSig signature, the signature (signature) and, if possible, the public
certificate (cert) must be integrated into the document in accordance with the standard. In
the case of a proprietary signature, this data must be stored in a different manner (e.g., in a
database) and assigned to the document. In both cases, this signature is used to check
whether the document was changed after signing.
signotec LCD signature pads can calculate and then sign a hash value using the image content
displayed during the signature. To do this, the desired image content must first be transferred
to the pad using the conventional methods DisplaySetImage(), DisplaySetText(), etc.;
during this process, it does not matter whether the data is transferred directly to the visible
foreground buffer or the invisible background buffer or non-volatile memory. However, it is
recommended that you use the so-called DisplayHashBuffer.
Content signing is started through the calling of SignatureStart(). The image content that
was previously used to calculate hash 1 is now displayed (if this has not already occurred),
and the signature process begins. Outputs on the screen are no longer possible in this state.
This allows the signature device to ensure that only the content that was previously used to
calculate hash 1 is visible during signing. Hash 1 is then encrypted and entered in the
biometric data; once the signature has been captured, hash 1 can be digitally signed with the
hash value of the biometrics (hereafter referred to as hash 2).
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 16 of 226
Once the signature has been captured, the capturing process must be completed as usual
using SignatureStop() or SignatureConfirm().
First, hash 1 and hash 2 have to be linked and signed. It is recommended to use the RSASSA-
PSS signature scheme; alternatively, a padding can also be used without a hash OID in
accordance with RSASSA-PKCS1-V1_5. The public certificate to verify the signature must be
collected from the pad in addition to the signature:
byte[] signData;
try
{
signData = stPad.RSAGetSignData(SignDataGetFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
The signature (signature) and the biometric data (signData) must then be stored, for
example in a database, along with the image data stream (imageData) and the signature
certificate (cert). This data can be used at a later stage to unambiguously prove that, during
the capture of the signature defined by the biometric data, only the screen content defined by
the image data stream was visible on the signature device. This is possible by calculating
hash 1 and hash 2 based on this data and comparing these values with the signature.
Most methods of the STPadCapt.ocx component and the STPadLib.dll return an integer value,
which is always negative in the case of an error. A description of the respective error
messages is provided in the following table. An error description can be retrieved at runtime
by calling the ControlGetErrorString() method.
The STPadLibNet.dll throws an STPadException if an error occurs, which is why all calls
should be enclosed with try() & catch(). The Message and ErrorCode properties of
STPadException contain an error description or one of the error codes listed below.
The error descriptions are available in the components in German, English, French and Italian.
Error Description
-1 A NULL pointer was passed.
-3 One of the parameters that were passed contains an invalid value.
-4 The signing pad is already being used by another application.
-5 No connection has been opened to this signature pad.
-6 A connection has already been opened.
-8 No device with this ID is connected.
-9 The LED colour that was passed cannot be set.
-12 The function could not be executed because the signature capture process is
running.
-13 No further hotspots can be added
-14 The function could not be executed because the coordinates of an active
hotspot overlap with the signature window or another active hotspot.
-15 The function could not be executed because no signature capture area has
been set.
-17 The function could not be executed because no signature capture process was
started.
-18 An error occurred while attempting to reserve memory.
-19 An error occurred while initialising a system resource.
-20 An error occurred while communicating with the signing pad.
-21 The rectangle that was passed is invalid.
-22 No compatible devices connected or the connection to a device has been cut.
-25 The connected device does not support this function or one of the parameters.
-26 Error while reading or writing a file.
-27 An error occurred when saving the key or certificate.
-28 The required key and/or certificate or CSR is not available.
-30 An internal error occurred in the signing pad during calculation.
-31 The transferred data is too large for the key stored in the signing pad.
-32 Data was lost when transferring signature data from the signature device.
-33 The function could not be executed because the device is in ‘Content signing’
mode.
-34 The key could not be overwritten because it is password protected and no
password was entered, or the password that was entered was incorrect.
-36 The option could not be changed because it is password protected and no
password was entered, or the password that was entered was incorrect.
-39 Signature capture could not be started because pen-controlled scrolling is
activated.
-40 The function could not be executed because the device does not feature an
NFC reader.
-81 The document could not be loaded because it is password protected and no
password was entered, or the password that was entered was incorrect.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 18 of 226
-82 The function could not be executed because the ‘STPdfLib13.dll’ file could not
be loaded.
-83 The function cannot be executed because no document has been loaded.
-84 The function could not be executed because the secure sign mode is active.
-85 The data does not contain biometric data.
-86 The data could not be decrypted.
-87 The public key of the transferred certificate does not match the key stored in
the pad.
-88 The certificate could not be decoded.
-89 The password that was passed is invalid.
-90 The function could not be executed because no Hash 1 has been passed.
-91 No Hash 2 has been computed on the biometric data because no hash
algorithm has been set.
-92 The function could not be executed because the ‘Content signing’ mode has
already been left.
-93 The function could not be executed because an overlay rectangle is set.
-94 The function could not be executed because the display content is scrolled.
-95 The function could not be executed because it would have activated the scroll
mode that is not possible if a hotspot outside the overlay rectangle is defined.
-97 An error occurred during initialisation. Please restart the software.
The signotec LCD Signature Pads have several image memory, which can be used by different
methods. An image memory has at least the size of the display and can store one picture in a
maximum of this size. Adding another image overrides the areas it overlaps with the existing
memory content. Adding multiple images to one memory can therefore create a collage.
Depending on the model, a different number of volatile and non-volatile memories are
available.
All signotec LCD Signature Pads have at least two volatile image memories, one foreground
buffer containing the current display content and one background buffer, which can be used to
prepare the display content. It can be written in both of the buffers.
The content of the volatile image memory is lost when you close the connection to the device.
The two volatile image memories have the size of the display (320 x 160 pixels).
The transmission and representation of images is usually so fast that there is no visible lag.
For more complex representations that consist of several individual images, it may be useful
to first save them in the background buffer before copying them into the foreground buffer.
The Omega model has three volatile image memories, two that have the doubled size of the
display (640 x 960 pixels) to be used as foreground and background buffers and one that has
the size of the display (640 x 480 pixels) to be used as overlay buffer. Its contents can be
overlaid over the current display content.
The speed of displaying an image in the Omega model with firmware up to Version 1.40
depends on the size and content of the images. The image composition is usually visible.
Therefore, images should always be stored first in the background buffer and then moved into
the foreground buffer.
An image is displayed in the Omega model with firmware 2.0 or newer only after it has been
transferred; the image composition is not visible. The speed of the image transmission
depends on the size and content of the images and the operating mode. If possible, the
device should always be operated in WinUSB mode. To this end, it is necessary to separately
install the signotec WinUSB driver (this is a component of the signoPAD-API). For more
complex representations that consist of several individual images, it can generally be useful to
first save them in the background buffer before copying them into the foreground buffer.
The Gamma model has three volatile image memories, two that are larger than the display
(800 x 1440 pixels) to be used as foreground and background buffers and one that has the
size of the display (800 x 480 pixels) to be used as overlay buffer. Its contents can be
overlaid over the current screen content.
With the Gamma model, an image is only displayed after it has been transferred; the image
composition is not visible. The speed of the image transmission depends on the size and
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 20 of 226
content of the images and the operating mode. If possible, the device should always be
operated in WinUSB mode. To this end, it is necessary to separately install the signotec
WinUSB driver (this is a component of the signoPAD-API). For more complex representations
that consist of several individual images, it can generally be useful to first save them in the
background buffer before copying them into the foreground buffer.
The Delta model has three volatile image memories, two that are larger than the display
(1280 x 37,600 pixels) to be used as foreground and background buffers and one that is the
size of the display (1280 x 800 pixels) to be used as overlay buffer. Its contents can be
overlaid over the current screen content.
The speed of displaying a picture in the Delta model depends on the size and content of the
images as well as the operating mode. The image composition is usually visible. Therefore,
images should always be stored first in the background buffer and then moved into the
foreground buffer. If possible, the device should always be operated in WinUSB mode. To this
end, it is necessary to separately install the signotec WinUSB driver (this is a component of
the signoPAD-API).
The Omega model has three volatile image memories, two that are larger than the display
(2048 x 2048 pixels) to be used as foreground and background buffers and one that has the
size of the display (768 x 1366 pixels) to be used as overlay buffer. Its contents can be
overlaid over the current screen content.
With the Alpha model, an image is only displayed after it has been transferred; the image
composition is not visible. The speed of the image transmission depends on the size and
content of the images and the operating mode. If possible, the device should always be
operated in WinUSB mode. To this end, it is necessary to separately install the signotec
WinUSB driver (this is a component of the signoPAD-API). For more complex representations
that consist of several individual images, it can generally be useful to first save them in the
background buffer before copying them into the foreground buffer.
Depending on the model, a different number of non-volatile memories are available. The
saving of images in non-volatile image memory lasts longer than storing in volatile image
memory, but the content remains unchanged even after switching off the device. An
intelligent memory management detects whether an image to be stored is already stored in
the device so that only the first time it’s stored it comes to a delay.
The Sigma model has one non-volatile image memory in the size of the display (320 x 160
pixels), which can only be used for the standby image. Due to the rapid transmission and
display of pictures, it is not necessary to be able to save other images permanently.
The Omega model has eleven non-volatile image memories, which can be used for the
standby image, the slide show and optimizations of the program. The memories, used for the
One non-volatile image memory has the doubled size of the display (640 x 960 pixels), ten
memories have the size of the display (640 x 480 pixels).
To use a non-volatile memory, this must be reserved first. This is done by calling the
DisplaySetTarget() method. The size of the currently selected memory can be queried using
the DisplayTargetWidth and DisplayTargetHeight properties.
The WinUSB operating mode which is available from Firmware 2.0 does not require the use of
non-volatile memory to optimise the program, as image transmission is very fast. However, it
depends on the individual case at hand and the developer should make the final decision.
The Gamma model has ten non-volatile image memories, which can be used for the standby
image, the slide show and optimisations of the program. The memories, used for the standby
image or the slide show, are read-only and can be freed only by disabling the standby image
or the slide show.
The ten non-volatile memories are the same size as the display (800 x 480 pixels).
To use a non-volatile memory, this must be reserved first. This is done by calling the
DisplaySetTarget() method. The size of the currently selected memory can be queried using
the DisplayTargetWidth and DisplayTargetHeight properties.
The WinUSB operating mode does not require the use of non-volatile memory to optimise the
program, as image transmission is very fast. However, it depends on the individual case at
hand and the developer should make the final decision.
The Delta model has 32 non-volatile image memories, which can be used for the standby
image, the slide show and optimisations of the program. The memories, used for the standby
image or the slide show, are read-only and can be freed only by disabling the standby image
or the slide show.
The 32 non-volatile memories are the same size as the display (1280 x 800 pixels).
To use a non-volatile memory, this must be reserved first. This is done by calling the
DisplaySetTarget() method. The size of the currently selected memory can be queried using
the DisplayTargetWidth and DisplayTargetHeight properties.
The WinUSB operating mode does not require the use of non-volatile memory to optimise the
program, as image transmission is very fast. However, it depends on the individual case at
hand and the developer should make the final decision.
The Alpha model has ten non-volatile image memories, which can be used for the standby
image, the slide show and optimisations of the program. The memories, used for the standby
image or the slide show, are read-only and can be freed only by disabling the standby image
or the slide show.
To use a non-volatile memory, this must be reserved first. This is done by calling the
DisplaySetTarget() method. The size of the currently selected memory can be queried using
the DisplayTargetWidth and DisplayTargetHeight properties.
The WinUSB operating mode does not require the use of non-volatile memory to optimise the
program, as image transmission is very fast. However, it depends on the individual case at
hand and the developer should make the final decision.
The contents can be copied between the most of the available image stores. The content of
the background buffer cannot be copied to the foreground buffer; it can only be moved. The
contents of the overlay buffer cannot be copied but only overlaid over the display content.
Typical copy operations are copying from a non-volatile image memory in a volatile image
memory and moving from the volatile background buffer into the foreground buffer. Copying
an image within the device is always faster than sending this image from the PC to the device.
Please refer to the descriptions of the DisplaySetImageFromStore() and
DisplaySetOverlayRect() methods for details.
Most applications use the same images with possibly variable units (such as document-related
texts) for the signature process. It therefore makes sense to store images that are the same
each time in one of the non-volatile memory if possible. The following is the typical work flow
for this scenario (C# sample code and use of the component STPadLibNet.dll; code is similar
for other languages and components):
First, the images are loaded, which will be permanently stored in the device, since they
change rarely. A memory is reserved by calling the DisplaySetTarget() method with the
value -1. The return value of the method is the ID of the memory used. If no non-volatile
image memory is available, the background buffer is set as an image buffer (ID = 1). This is
always the case when using the Sigma model. When using the Omega, Gamma and Alpha
models, the number of available memories can be less than expected when a slide show is
configured.
Text and images that are added to a non-volatile memory are only saved locally to begin with
and are sent to the device only when DisplaySetImageFromStore() or
DisplayConfigSlideShow() is called in order to be able to compare the image (which may be
composed of several texts and images) with the image already stored in the device. Thus only
when one of these methods is called, there will be a noticeable delay.
The content can now be copied to a volatile memory, typically the background buffer
(DisplaySetTarget(DisplayTarget.BackgroundBuffer)). If the images have already been
written to the background buffer because no non-volatile memory was available (see above),
the DisplaySetImageFromStore() method will not function, however it will also not produce
any errors and can therefore be safely called.
try
{
stPad.DisplaySetTarget(DisplayTarget.BackgroundBuffer);
stPad.DisplaySetImageFromStore(targetStore);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Now content, that change with every signature process, can be added to the background
buffer.
try
{
stPad.DisplaySetImageFromFile(120, 400, @"C:\3.bmp");
stPad.DisplaySetText(200, 160, TextAlignment.Left, "01.01.2010");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
In the background buffer there’s now a collage of two images and a text copied from a non-
volatile memory and an image and a text that have been sent from the PC. This collage can
now be moved into the foreground buffer and thus displayed on the screen. The total
composition has happened before in the background buffer and thus "invisible".
try
{
stPad.DisplaySetTarget(DisplayTarget.ForegroundBuffer);
stPad.DisplaySetImageFromStore(DisplayTarget.BackgroundBuffer);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
The signotec LCD signature pads (Omega, Gamma, Delta and Alpha models only) can display
one or more images automatically when not in use (no established connection). These images
are stored permanently in the device and they are displayed without launching any application
on the PC.
Image memories that are used by the standby feature are write protected and cannot be used
for by an application.
In all devices, an image that is displayed automatically in standby can be stored permanently.
Please refer to the descriptions of the DisplaySetStandbyImage() and
DisplaySetStandbyImageFromFile() methods for details.
As an alternative to a logo, the Omega, Gamma, Delta and Alpha models can display a slide
show containing up to ten (Gamma and Alpha), 11 (Omega) or 32 (Delta) images. To
configure a slide show, please follow these steps:
Then any contents can be written to one or more of the non-volatile image memories (as
described in 7.4). When all the contents have been written, the desired image memories must
be configured using the DisplayConfigSlideShow() or DisplayConfigSlideShowEx()
method.
Since after closing the connection to a device all the information about reserved stores is lost,
two applications may use the same memory and thus always overwrite it. As a result, the use
of non-volatile memories can even cause slower program execution.
To avoid this problem, a user may exclusively reserve up to ten image memories of an Omega
device for a particular application. These stores are not available to other applications and
thus cannot be overwritten accidently.
Applications must provide the component with their name in order to support this
functionality. This is done with the ControlAppName property. Users can enter this name in
the configuration file and reserve a certain number of memories for this application.
Memories are assigned in the STPadStores.ini file, which must be located in the
‘%COMMONPROGRAMFILES%\signotec\config’ folder, or in the case of 64-bit Windows, in the
‘%COMMONPROGRAMFILES(x86)%\signtotec\config’ folder. The configuration in this file only
applies to this workstation; if the pad is connected to another PC without configuration, all
memories will be available there again.
The file can contain up to ten sections (for ten applications). The names of the sections are
[Application1], [Application2], etc.
Each section contains two keys named Name and StoreCount. The Name key contains the
name given by the application (see above). The StoreCount key contains the number of
memories to be reserved. It does not matter if memory is reserved for one or several
applications, but the sum of the reserved memories must not exceed 10. The Omega memory
with a size of 640 x 960 pixels cannot be used exclusively.
[Application1]
Name=My Great App
StoreCount=2
[Application2]
Name=Another Great App
StoreCount=4
If not all of the available memory is assigned exclusively, all further image memories are
available for all applications. If a standby image or a slide show has already been configured
for the device, the maximum number of available memories is reduced accordingly. If a
standby image or slide show is configured by an application on a workstation with a memory
configuration, only memories can be used in this context that have been reserved for the
respective application or have not been reserved at all.
- Methods that set or query general hardware properties begin with ‘Device’
- Methods that set or query sensor properties begin with ‘Sensor’
- Methods that apply to the signature begin with ‘Signature’
- Methods that set or query LCD properties begin with ‘Display’
- Methods that set or query component properties begin with ‘Control’
- Methods that are connected to the RSA functionality of the device begin with ‘RSA’.
- Methods that are connected to the loading of PDF documents begin with ‘PDF’
The methods included in the STPadLib.dll component all begin with ‘ST,’ for example,
„STDeviceOpen()“.
Some methods and parameters are not contained in all components, so you should always
take note of the given method declaration. The methods are declared by the STPadCapt.ocx
component in MIDL syntax, by the STPadLib.dll component in C syntax and by the
STPadLibNet.dll component in C# and VB syntax.
DeviceSetComPort method
This method defines the interfaces to be searched for devices when DeviceGetCount() is
called up. A search will only be made for HID devices unless this method is called up.
In a Terminal Server environment, it is possible to pass through devices via a virtual channel
from the client to the server. The API independently detects whether such a channel is
configured. The channel appears as COM1 or COM2 for the application. This means that
existing applications that communicate with a signature device via the serial interface do not
need to be adjusted for operation via a virtual channel. For details of the signotec Virtual
Channel, please get in touch with your contact at signotec.
In the STPad.ini configuration file, you can specify that the search will initially be made via the
virtual channel provided at least one COM port has been specified. For this purpose, the
ForceVC key must be set to YES.
In order to query the connection to which an existing device is connected please use
theDeviceGetComPort() and DeviceGetIPAddress()methods.
8.1.1 STPadCapt.ocx
Available from Version 8.0.6 onwards. The described state is available as of Version 8.1.2.
int nPortCount =
axSTPadCapt1.DeviceSetComPort("HID;1;4;IP=192.168.100.100:1002");
if (nPortCount < 0)
MessageBox.Show(String.Format("Error {0}", nPortCount);
else
MessageBox.Show(String.Format("{0} ports set.", nPortCount);
8.1.2 STPadLib.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.2.
8.1.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.2.
8.1.3.1 Implementation in C#
try
{
int nPortCount =
stPad.DeviceSetComPort("HID;1;4;IP=192.168.100.100:1002");
MessageBox.Show(String.Format("{0} ports set.", nPortCount);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nPortCount As Integer =
STPad.DeviceSetComPort("HID;1;4;IP=192.168.100.100:1002")
MsgBox(CStr(nPortCount) & " ports set")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetConnectionType method
This method returns the type of connection via which a device is connected.
ByVal index As
Integer
Return value Values Description
LONG 0 HID
int 1 WinUSB
2 Serial or virtual channel
Integer 3 Ethernet
< 0 Error (not for STPadLibNet.dll)
8.2.1 STPadCapt.ocx
8.2.1.1 Implementation in C#
8.2.2 STPadLib.dll
8.2.3 STPadLibNet.dll
try
{
int nPort = stPad.DeviceGetConnectionType(0);
switch (nType)
{
case 0:
MessageBox.Show("The device is connected via HID.");
break;
case 1:
MessageBox.Show("The device is connected via WinUSB.");
break;
case 2:
MessageBox.Show("The device is connected to a serial port.");
break;
case 3:
MessageBox.Show("The device is connected via IP.");
break;
default:
MessageBox.Show(String.Format("Unknown connection type: {0}",
nType);
break;
}
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nType As Integer = STPad.DeviceGetConnectionType(0)
Select Case nType
Case 0
MsgBox("The device is connected via HID.")
Case 1
MsgBox("The device is connected via WinUSB.")
Case 2
MsgBox("The device is connected to a serial port.")
Case 3
MsgBox("The device is connected via IP.")
Case Else
MsgBox("Unknown connection type: " & CStr(nType))
End Select
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetComPort method
This method returns the number of the COM port or virtual channel to which a device is
connected.
ByVal index As
Integer
Return value Values Description
LONG >= 0 Number of the COM port for serial devices. (Note:
int Devices that are not serially connected return 0; use
DeviceGetConnectionType() to ascertain the type of
Integer connection)
< 0 Error (not for STPadLibNet.dll)
8.3.1 STPadCapt.ocx
8.3.1.1 Implementation in C#
8.3.2 STPadLib.dll
8.3.3 STPadLibNet.dll
8.3.3.1 Implementation in C#
try
{
int nPort = stPad.DeviceGetComPort(0);
MessageBox.Show(String.Format
"This device is connected to COM port {0}.", nPort));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nPort As Integer = STPad.DeviceGetComPort(0)
MsgBox("This device is connected to COM port " & CStr(nPort))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetIPAddress method
You can use this method to retrieve the IP address of the signotec Ethernet USB adapter to
which a device is connected.
ByVal index As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
string "" The device is not connected via IP
String max. Device IP address and port ("x.x.x.x:x")
32
charac
ters
8.4.1 STPadCapt.ocx
8.4.1.1 Implementation in C#
8.4.2 STPadLib.dll
WCHAR szAddress[32];
LONG nResult = STDeviceGetIPAddress(szAddress, 0);
if (nResult < 0)
wprintf(L"Error %d", nResult);
else
wprintf(L"The device is connected to: %s", szAddress);
8.4.3 STPadLibNet.dll
8.4.3.1 Implementation in C#
try
{
MessageBox.Show(String.Format("The device is connected to: {0}",
stPad.DeviceGetIPAddress(0)));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
MsgBox("The device is connected to: " & STPad.DeviceGetIPAddress(0))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetCount method
This method searches for connected devices, generates an internal index beginning with 0 and
returns the number of devices detected. This value should be cached so that the method only
needs to be called, if the number of connected devices has changed. A device’s index is
retained until the method is called again. The index can be assigned to a device via the
information returned by DeviceGetInfo().
By default, a search will only be made for HID and WinUSB devices that are locally connected.
A search will only be made for other devices if this has been configured previously by calling
up DeviceSetComPort().
Please observe the relevant information in the ‘Using multiple instances’ section.
Integer
8.5.1 STPadCapt.ocx
LONG DeviceGetCount()
8.5.1.1 Implementation in C#
LONG STDeviceGetCount()
8.5.3 STPadLibNet.dll
int DeviceGetCount()
Function DeviceGetCount() As Integer
8.5.3.1 Implementation in C#
try
{
int nDeviceCount = stPad.DeviceGetCount();
MessageBox.Show(String.Format("{0} devices detected.",
nDeviceCount));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nPort As Integer = STPad.DeviceGetCount()
MsgBox(CStr(nDeviceCount) & " devices detected.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetInfo method
You can use this method to retrieve the serial number and model type of a connected device
in order to uniquely identify it.
ByVal index As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.6.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
8.6.1.1 Implementation in C#
8.6.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.1.
WCHAR szSerial[16];
LONG nType = 0;
LONG nRc = STDeviceGetInfo(szSerial, &nType, 0);
if (nRc < 0)
wprintf(L"Error %d", nRc);
else
wprintf(L"Type: %d, Serial: %s", nType, szSerial);
8.6.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.1.
8.6.3.1 Implementation in C#
try
{
string strSerial = "";
int nType = 0;
stPad.DeviceGetInfo(out strSerial, out nType, 0);
MessageBox.Show(String.Format("Type: {0}, Serial: {1}", nType,
strSerial);}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim strSerial As String = ""
Dim nType As Integer = 0
STPad.DeviceGetInfo(strSerial, nType, 0)
MsgBox("Type: " & CStr(nType) & ", Serial: " & strSerial)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetVersion method
You can use this method to retrieve the version number of a connected device’s firmware. It is
intended primarily for support purposes.
ByVal index As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
string max. Firmware version number (major.minor)
String 16
chars
8.7.1 STPadCapt.ocx
8.7.1.1 Implementation in C#
8.7.2 STPadLib.dll
WCHAR szVersion[16];
LONG nRc = STDeviceGetVersion(szVersion, 0);
if (nRc < 0)
wprintf(L"Error %d", nRc);
else
wprintf(L"Firmware: %s", szVersion);
8.7.3 STPadLibNet.dll
8.7.3.1 Implementation in C#
try
{
MessageBox.Show(String.Format("Firmware: {0}",
stPad.DeviceGetVersion(0)));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
MsgBox("Firmware: " & STPad.DeviceGetVersion(0))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetCapabilities method
You can use this method to retrieve various properties of a connected device.
ByVal index As
Integer
Return value Values Description
LONG 0 Bitmask from which the properties can be read (for
details see below)
< 0 Error
PadCapabilities != Class instance from which the properties can be read
NULL (for details see below)
8.8.1 STPadCapt.ocx
8.8.1.1 Implementation in C#
8.8.2 STPadLib.dll
The following values defined in the header file can be used to evaluate the return value:
8.8.3 STPadLibNet.dll
8.8.3.1 Implementation in C#
try
{
if (stPad.DeviceGetCapabilities(0).SupportsRSA)
MessageBox.Show("Device supports RSA");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
If STPad.DeviceGetCapabilities(0).SupportsRSA Then
MsgBox("Device supports RSA")
End If
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceOpen method
This method opens a connection to a device. The backlight is switched on if this is configured
in the STPad.ini file (see method DisplaySetBacklight()).
Please observe the relevant information in the ‘Using multiple instances’ section.
ByVal index As
Integer
VARIANT true IThe device display screen will be erased
bEraseDisplay (Default)
BOOL bEraseDisplay false I The content of the display screen will not
change; the screen content displayed cannot
bool eraseDisplay
be copied into another image memory at a
ByVal eraseDisplay later stage; the control element cannot display
As Boolean the screen content (Optional)
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.9.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.0.25.
Please note: The bEraseDisplay parameter is optional and must contain a Boolean value if it
is transferred.
8.9.1.1 Implementation in C#
8.9.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.25.
8.9.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.25.
8.9.3.1 Implementation in C#
try
{
stPad.DeviceOpen(0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DeviceOpen(0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceClose method
This method closes the connection to a device. It can also be opened in another instance,
provided it is running in the same memory area as the instance that is currently being used.
Before closing, a currently running signature capture process is terminated and the backlight
switched off, where appropriate, if so configured in the STPad.ini file (see method
DisplaySetBacklight()).
Captured signature data is discarded. When the STPadCapt.ocx component is used, this
method is called automatically as soon as the window containing the control element is closed.
ByVal index As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.10.1 STPadCapt.ocx
8.10.2 STPadLib.dll
8.10.3 STPadLibNet.dll
8.10.3.1 Implementation in C#
try
{
stPad.DeviceClose(0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DeviceClose(0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceSetLed method
This method sets the colour of the LED on the front of the pad. The DeviceLedDefaultFlag
property should be set to FALSE when this method is used, in order to ensure that the colour
is not changed when SignatureStart(), SignatureCancel() and SignatureConfirm() are
8.11.1 STPadCapt.ocx
8.11.1.1 Implementation in C#
8.11.2 STPadLib.dll
The following values defined in the header file can be used for the nLedColor parameter:
8.11.3 STPadLibNet.dll
Off = 0,
Yellow = 1,
Green = 2
8.11.3.1 Implementation in C#
try
{
stPad.DeviceSetLed(LedColorFlag.Yellow);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DeviceSetLed(LedColorFlag.Yellow)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceGetNFCMode method
This method reads out the operating mode of the optionally installed NFC reader. Whether the
connected device has an NFC reader can be queried using the DeviceGetCapabilities()
method.
ByVal index As
Integer
Return value Values Description
LONG 0–1 Operating mode (see also DeviceSetNFCMode())
< 0 Error
NFCMode Off Operating mode (see also DeviceSetNFCMode())
On
8.12.1 STPadCapt.ocx
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
8.12.2 STPadLib.dll
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
The following values defined in the header file can be used for the nMode parameter:
#define STPAD_NFC_OFF 0
#define STPAD_NFC_ON 1
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
Off = 0,
On = 1
8.12.3.1 Implementation in C#
try
{
switch (stPad.DeviceGetNFCMode(0))
{
case NFCMode.Off:
MessageBox.Show("The NFC reader is currently switched off.");
break;
case NFCMode.On:
MessageBox.Show("The NFC reader is currently switched on.");
break;
}
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Select Case STPad.DeviceGetNFCMode(0)
Case NFCMode.Off
MsgBox("The NFC reader is currently switched off.")
Case NFCMode.On
MsgBox("The NFC reader is currently switched on.")
End Select
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceSetNFCMode method
This method changes the operating mode of the optionally installed NFC reader. It can only be
called if a connection to the device has not been opened in another application. Whether the
connected device has an NFC reader can be queried using the DeviceGetCapabilities()
method.
ByVal index As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.13.1 STPadCapt.ocx
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
8.13.1.1 Implementation in C#
8.13.2 STPadLib.dll
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
The following values defined in the header file can be used for the nMode parameter:
#define STPAD_NFC_OFF 0
#define STPAD_NFC_ON 1
#define STPAD_NFC_PERMANENTLYOFF 2
#define STPAD_NFC_PERMANENTLYON 3
Available from Version 8.4.0 onwards. The status described is available from Version
8.4.1010.
Off = 0,
On = 1,
PermanentlyOff = 2,
PermanentlyOn = 3
8.13.3.1 Implementation in C#
try
{
stPad.DeviceSetNFCMode(NFCMode.On, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DeviceSetNFCMode(NFCMode.On, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DeviceStartService method
This method starts one of the configuration dialog boxes on the signature device. The device
cannot be reached as long as the dialog is displayed. The device restarts if the type of
connection or the IP configuration is adjusted in the configuration dialog box.
8.14.1 STPadCapt.ocx
Available from Version 8.1.2 onwards. The status described is available from Version 8.4.0.
8.14.1.1 Implementation in C#
8.14.2 STPadLib.dll
Available from Version 8.1.2 onwards. The status described is available from Version 8.4.0.
8.14.3 STPadLibNet.dll
Available from Version 8.1.2 onwards. The status described is available from Version 8.4.0.
8.14.3.1 Implementation in C#
try
{
stPad.DeviceStartService(1);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DeviceStartService(1)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorGetSampleRateMode method
This method returns the configured sample rate with which the signature is captured.
8.15.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The described state is available as of Version 8.1.1.
LONG SensorGetSampleRateMode()
8.15.1.1 Implementation in C#
8.15.2 STPadLib.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.1.
8.15.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.1.
signotec.STPadLibNet.SampleRate SensorGetSampleRateMode()
Function SensorGetSampleRateMode() As signotec.STPadLibNet.SampleRate
Hz125 = 0,
Hz250 = 1,
Hz500 = 2,
Hz280 = 3
try
{
switch (stPad.SensorGetSampleRateMode())
{
case SampleRate.Hz125:
MessageBox.Show("Sample rate is 125 Hz.");
break;
case SampleRate.Hz250:
MessageBox.Show("Sample rate is 250 Hz.");
break;
case SampleRate.Hz500:
MessageBox.Show("Sample rate is 500 Hz.");
break;
case SampleRate.Hz280:
MessageBox.Show("Sample rate is 280 Hz.");
break;
}
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Select Case STPad.SensorGetSampleRateMode()
Case SampleRate.Hz125
MsgBox("Sample rate is 125 Hz.")
Case SampleRate.Hz250
MsgBox("Sample rate is 250 Hz.")
Case SampleRate.Hz500
MsgBox("Sample rate is 500 Hz.")
Case SampleRate.Hz280
MsgBox("Sample rate is 280 Hz.")
End Select
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorSetSampleRateMode method
This method sets the sample rate with which the signature is captured. The default setting is
mode 1 (250 Hz) or mode 3 (280 Hz) when using the Alpha model. This mode provides high-
quality signature data while at the same time ensures that the data record is of moderate
size. When using the Sigma, Gamma and Omega models, this value can easily be set to 2
(500 Hz) for high-speed data lines.
8.16.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The described state is available as of Version 8.1.1.
8.16.1.1 Implementation in C#
8.16.2 STPadLib.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.1.
8.16.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.1.
Hz125 = 0,
Hz250 = 1,
Hz500 = 2,
Hz280 = 3
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 57 of 226
8.16.3.1 Implementation in C#
try
{
stPad.SensorSetSampleRateMode(SampleRate.Hz250);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetSampleRateMode(SampleRate.Hz250)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorSetSignRect method
This method defines the rectangle in which the signature is captured. If the rectangle overlaps
with one of the fixed hotspots (see SensorAddHotSpot()), an error is returned.
8.17.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.4.1.5.
8.17.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
8.17.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
8.17.3.1 Implementation in C#
try
{
stPad.SensorSetSignRect(0, 40, 0, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetSignRect(0, 40, 0, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorClearSignRect method
8.18.1 STPadCapt.ocx
LONG SensorClearSignRect()
8.18.1.1 Implementation in C#
8.18.2 STPadLib.dll
LONG STSensorClearSignRect()
8.18.3 STPadLibNet.dll
void SensorClearSignRect()
Sub SensorClearSignRect()
8.18.3.1 Implementation in C#
try
{
stPad.SensorClearSignRect();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorClearSignRect()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorSetScrollArea method
This method defines a rectangular subarea of the non-volatile memory whose content can be
scrolled. The subarea must be at least as big as the display and fully encompass the displayed
area. Once a connection has been opened, the entire memory is set as the scroll area.
ByVal left As
Integer
LONG nTop >= 0 I Upper boundary; 0 is at the top of the memory
int top
ByVal top As
Integer
LONG nWidth > 0 IWidth, must be >= DisplayWidth;
int width DisplayTargetWidth holds the width of the
currently set memory
ByVal width As 0 I Right boundary is automatically set to the
Integer
maximum value (right margin of the memory)
LONG nHeight > 0 I Height, must be >= DisplayHeight;
int height DisplayTargetHeight holds the height of the
currently set memory
ByVal height As 0 I Lower boundary is automatically set to the
Integer
maximum value (lower margin of the memory)
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.19.1 STPadCapt.ocx
8.19.1.1 Implementation in C#
8.19.2 STPadLib.dll
8.19.3 STPadLibNet.dll
8.19.3.1 Implementation in C#
try
{
stPad.SensorSetScrollArea(0, 0, 0, 960);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetScrollArea(0, 0, 0, 960)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorSetPenScrollingEnabled method
This method activates scrolling with the pen. In this mode, the memory contents can be offset
by moving the pen on the display within the area set via SensorSetScrollArea. The application
is informed about this via the DisplayScrollPosChanged() event.
8.20.1 STPadCapt.ocx
Available from Version 8.3.1 onwards. The status described is available from Version 8.4.1.5.
8.20.1.1 Implementation in C#
8.20.2 STPadLib.dll
Available from Version 8.3.1 onwards. The status described is available from Version 8.4.1.5.
8.20.3 STPadLibNet.dll
Available from Version 8.3.1 onwards. The status described is available from Version 8.4.1.5.
try
{
stPad.SensorSetPenScrollingEnabled(true);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetPenScrollingEnabled(True)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorAddHotSpot method
This method defines a rectangular subarea of the sensor surface that responds to user clicks.
See also SensorHotSpotPressed(). The rectangle must lie in the area defined by
DisplaySetOverlayRect() if a scroll hotspot has already been defined. It should not overlap
with the defined signature window (see SensorSetSignRect()) or a hotspot that was
previously set.
8.21.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
8.21.2 STPadLib.dll
8.21.3 STPadLibNet.dll
8.21.3.1 Implementation in C#
try
{
stPad.SensorAddHotSpot(0, 0, 0, 40);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorAddHotSpot(0, 0, 0, 40)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorAddScrollHotSpot method
This method defines a rectangular subarea of the sensor surface that responds to user clicks.
Depending on the option that is used, the subarea is either created as a scroll hotspot or as a
scrollable hotspot.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 65 of 226
If a scroll hotspot is activated by the user, the screen content is scrolled to the left, to the
right, up or down at the speed defined by the DisplayScrollSpeed property and the
DisplayScrollPosChanged() event is called. A scroll hotspot only responds to clicks if it lies
in the area defined by DisplaySetOverlayRect(); otherwise it is inactive.
The rectangle should not overlap with the defined signature window (see
SensorSetSignRect()) or a fixed hotspot that was previously set.
A scrollable hotspot behaves like a normal hotspot (also see SensorAddHotSpot()), however,
it is moved with the displayed content during scrolling. A scrollable hotspot does not respond
to clicks if it lies in the area defined by DisplaySetOverlayRect().
The rectangle should not overlap with a scrollable hotspot that was previously set. The
rectangle should not overlap with the defined signature window (see SensorSetSignRect())
while a signature capture process is currently running.
This method only works with the Omega, Gamma and Delta models as well as with Alpha
models with firmware 1.8 or a newer version.
Available from Version 8.0.17 onwards. The status described is available from Version 8.4.1.5.
8.22.1.1 Implementation in C#
8.22.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
kScrollDown = 0,
kScrollUp = 1,
kScrollRight = 2,
kScrollLeft = 3,
kScrollable = 4
8.22.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
8.22.3.1 Implementation in C#
try
{
stPad.SensorAddScrollHotSpot(0, 0, 0, 40, ScrollOption.ScrollDown);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorAddScrollHotSpot(0, 0, 0, 40, ScrollOption.ScrollDown)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorSetHotspotMode method
8.23.1 STPadCapt.ocx
Available from Version 8.0.16 onwards. The status described is available from Version 8.4.1.5.
8.23.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
kInactive = 0,
kActive = 1,
kInvertOff = 2
8.23.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
Inactive = 0,
Active = 1,
InvertOff = 2
8.23.3.1 Implementation in C#
try
{
stPad.SensorSetHotspotMode(HotSpotMode.Active, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetHotspotMode(HotSpotMode.Active, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorClearHotSpots method
8.24.1 STPadCapt.ocx
LONG SensorClearHotSpots()
8.24.1.1 Implementation in C#
8.24.2 STPadLib.dll
LONG STSensorClearHotSpots()
8.24.3 STPadLibNet.dll
void SensorClearHotSpots()
Sub SensorClearHotSpots()
try
{
stPad.SensorClearHotSpots();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorClearHotSpots()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorStartTimer method
This method starts a Timer, which starts a defined function, if there was no interaction on the
sensor of the pad for the given time periods. This Functionality is intended primarily to
capture a signature without user interaction, but it can also be used to get a confirmation for
a displayed text, if the belonging hotspot is not pressed for a given time period.
Available from Version 8.0.11 onwards. The status described is available from Version 8.3.1.
8.25.1.1 Implementation in C#
8.25.2 STPadLib.dll
8.25.3 STPadLibNet.dll
CallEvent = 0,
CallCancelOrConfirm = 1,
CallCancel = 2
8.25.3.1 Implementation in C#
try
{
stPad.SensorStartTimer(10000, 1000, TimerOption.CallEvent);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorStartTimer(10000, 1000, TimerOption.CallEvent)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SensorStopTimer method
This method stops a timer started with SensorStartTimer() without triggering the function
defined there. The method is called automatically if SignatureConfirm() or
SignatureCancel() is called.
8.26.1 STPadCapt.ocx
LONG SensorStopTimer()
8.26.1.1 Implementation in C#
8.26.2 STPadLib.dll
LONG STSensorStopTimer()
8.26.3 STPadLibNet.dll
8.26.3.1 Implementation in C#
try
{
stPad.SensorStopTimer();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorStopTimer()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureSetSecureMode method
This method places the signature device in the secure sign mode. In this mode, the biometric
data can only be read using the RSAGetSignData() method. The SignatureGetSignData()
and SignatureGetIsoData() methods cannot be used; the SignatureDataReceived() event
is called with 0 for all parameters.
The method must be called before SignatureStart() is called; the mode is retained until the
device is closed.
This method only works if a public key for encrypting the biometric data is stored in the device
(see also RSASetEncryptionCert()).
8.27.1 STPadCapt.ocx
Available from Version 8.0.30 onwards. The described state is available as of Version 8.1.2.
8.27.2 STPadLib.dll
Available from Version 8.0.30 onwards. The described state is available as of Version 8.1.2.
8.27.3 STPadLibNet.dll
Available from Version 8.0.30 onwards. The described state is available as of Version 8.1.2.
8.27.3.1 Implementation in C#
try
{
stPad.SignatureSetSecureMode(true);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SignatureSetSecureMode(True)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureStart method
This method starts the signature capture process provided a connection has been opened via
DeviceOpen(). The entire sensor is used as a writing surface provided no signature window
has been defined. Signature data is only received, if a signature is actually entered on the
pad. The method also sets the colour of the LED to green unless the DeviceLedDefaultFlag
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 75 of 226
property is set to FALSE. This method automatically restores the previous content of the LCD
unless this has been explicitly erased by calling DisplayErase().
This method cannot be called if an active scrollable button overlaps with the defined signature
window (see SensorSetSignRect()).
If a hash 1 has been previously set using the RSASetHash() method, it is now transferred to
the signature device. If, before this method is called, a hash 1 was generated using the
RSACreateDisplayHash() method, the content that was used to calculate the hash is
displayed (if it is not yet being displayed), and content signing is started. Outputs on the
screen are no longer possible in this state. This allows the signature device to ensure that
hash 1 was calculated using the screen content visible during signing. In both cases, hash 1 is
inseparably linked with the signature captured subsequently. Once a signature has been
captured (see also SignatureStop() and/or SignatureConfirm()) hash 1, hash 2 generated
using the biometric data or the combination of both can be digitally signed using the
RSASign() method.
8.28.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.4.1.5.
LONG SignatureStart()
8.28.1.1 Implementation in C#
8.28.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
LONG STSignatureStart()
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
void SignatureStart()
Sub SignatureStart()
8.28.3.1 Implementation in C#
try
{
stPad.SignatureStart();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SignatureStart()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureStop method
This method terminates the signature capture process that is currently running, and caches
the captured signature data. Unlike the SignatureConfirm() method, it does not change the
display content. The SignatureStop() method sets the colour of the LED to yellow unless the
DeviceLedDefaultFlag property is set to FALSE.
The hash 1, hash 2 or the combination of hash 1 and hash 2 can be signed in the signature
device using the RSASign() method (see also SignatureStart()).
8.29.1 STPadCapt.ocx
Available from Version 8.0.14 onwards. The status described is available from Version 8.0.26.
LONG SignatureStop()
8.29.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.26.
LONG STSignatureStop()
8.29.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.26.
int SignatureStop()
Function SignatureStop() As Integer
8.29.3.1 Implementation in C#
try
{
int nResult = stPad.SignatureStop();
MessageBox.Show(String.Format("{0} points captured.", nResult);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nResult As Integer = STPad.SignatureStop()
MsgBox(CStr(nResult) & " points captured.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 78 of 226
SignatureConfirm method
This methods terminates the signature capture process that is currently running (if any),
caches the captured signature data and, unlike SignatureStop(), erases the entire LCD. The
displayed signature is retained in the control element for visual inspection. To delete the
signature from the control element, please use ControlErase(). SignatureConfirm() sets
the colour of the LED to yellow unless the DeviceLedDefaultFlag property is set to FALSE.
The hash 1, hash 2 or the combination of hash 1 and hash 2 can be signed digitally in the
signature device using the RSASign() method (see also SignatureStart()).
8.30.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.0.26.
LONG SignatureConfirm()
8.30.1.1 Implementation in C#
8.30.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.26.
LONG STSignatureConfirm()
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.26.
int SignatureConfirm()
Function SignatureConfirm() As Integer
8.30.3.1 Implementation in C#
try
{
int nResult = stPad.SignatureConfirm();
MessageBox.Show(String.Format("{0} points captured.", nResult);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nResult As Integer = STPad.SignatureConfirm()
MsgBox(CStr(nResult) & " points captured.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureRetry method
This method discards the signature data without ending the signature capture process, and
deletes the rendered signature in the control element and on the LCD. This method will start a
new capture process if the signature capture process was terminated beforehand with
SignatureStop().
8.31.1 STPadCapt.ocx
LONG SignatureRetry()
8.31.1.1 Implementation in C#
8.31.2 STPadLib.dll
LONG STSignatureRetry()
8.31.3 STPadLibNet.dll
void SignatureRetry()
Sub SignatureRetry()
8.31.3.1 Implementation in C#
try
{
int nResult = stPad.SignatureRetry();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nResult As Integer = STPad.SignatureRetry()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureCancel method
This method ends the capture process, discards the signature data and deletes the entire LCD
or just the signature. It also sets the colour of the LED to yellow unless the
DeviceLedDefaultFlag property is set to FALSE. This method is called automatically when
DeviceClose() is used.
Calling this method aborts content signing (see also SignatureStart()). The signature device
can then be used as normal again.
8.32.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.0.24.
Please note: The nErase parameter is optional and must contain a number if it is transferred.
8.32.1.1 Implementation in C#
8.32.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.24.
kComplete = 0,
kSignature = 1
8.32.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.24.
Complete = 0,
Signature = 1
8.32.3.1 Implementation in C#
try
{
int nResult = stPad.SignatureCancel();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nResult As Integer = STPad.SignatureCancel()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureGetSignData method
This method returns the digitalised signature in SignData format. In order to keep the
biometric data in an RSA-encrypted format, please use the RSAGetSignData() method.
8.33.1 STPadCapt.ocx
8.33.1.1 Implementation in C#
8.33.2 STPadLib.dll
LONG nSize = 0;
LONG nRc = STSignatureGetSignData(NULL, &nSize);
BYTE* pbtSignData = NULL;
if (nRc == 0)
{
pbtSignData = new BYTE[nSize];
nRc = STSignatureGetSignData(pbtSignData, &nSize);
}
if (nRc < 0)
wprintf(L"Error %d", nRc);
8.33.3 STPadLibNet.dll
byte[] SignatureGetSignData()
Function SignatureGetSignData() As Byte()
8.33.3.1 Implementation in C#
byte[] signData;
try
{
signData = stPad.SignatureGetSignData();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
SignatureGetIsoData method
This method returns the digitised signature in a standardised format in accordance with
ISO/IEC 19794-7. In order to keep the biometric data in an RSA-encrypted format, please use
the RSAGetSignData() method.
8.34.1.1 Implementation in C#
8.34.2 STPadLib.dll
The following values defined in the header file can be used for the nOptions parameter:
LONG nSize = 0;
LONG nRc = STSignatureGetIsoData(NULL, &nSize, 0, NULL, 0, 0);
BYTE* pbtIsoData = NULL;
if (nRc == 0)
{
pbtIsoData = new BYTE[nSize];
nRc = STSignatureGetIsoData(pbtIsoData, &nSize, 0);
}
if (nRc < 0)
wprintf(L"Error %d", nRc);
8.34.3 STPadLibNet.dll
8.34.3.1 Implementation in C#
SignatureSaveAsStream/SignatureSaveAsFile method
These methods are obsolete and are only included for compatibility reasons. Please use
SignatureSaveAsStreamEx() or SignatureSaveAsFileEx() instead.
This method can be used to request a captured signature as image data in the memory or
save it as an image file on the hard drive. The colour depth depends on the file type, the
device used and the settings. If no further settings are made (see nOptions parameter), the
image is created with the aspect ratio of the rectangle that surrounds the signature.
8.36.1 STPadCapt.ocx
Available from Version 8.0.14 onwards. The status described is available from Version 8.3.1.
int nResult;
nResult = axSTPadCapt1.SignatureSaveAsFileEx("C:/Signature.tif", 300, 0,
0, 0, 0, (uint)ColorTranslator.ToOle(Color.FromArgb(0, 0, 255)), 0);
if (nResult < 0)
MessageBox.Show(String.Format("Error {0}", nResult);
8.36.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.24.
The following values defined in the header file can be used for the nOptions parameter:
LONG nSize = 0;
LONG nRc = STSignatureSaveAsStreamEx(NULL, &nSize, 300, 0, 0, kBmp, 0,
RGB(0, 0, 255), 0);
BYTE* pbtImage = NULL;
BITMAP bitmap;
if (nRc == 0)
{
pbtImage = new BYTE[nSize];
nRc = STSignatureSaveAsStreamEx(pbtImage, &nSize, 300, 0, 0, kBmp, 0,
RGB(0, 0, 255), 0);
}
if (nRc == 0)
{
BITMAPFILEHEADER bmfh = (*(BITMAPFILEHEADER*)pbtImage);
BITMAPINFO bmi = (*(BITMAPINFO*)(pbtImage +
sizeof(BITMAPFILEHEADER)));
bitmap.bmType = 0;
bitmap.bmWidth = bmi.bmiHeader.biWidth;
bitmap.bmHeight = bmi.bmiHeader.biHeight;
bitmap.bmPlanes = bmi.bmiHeader.biPlanes;
bitmap.bmBitsPixel = bmi.bmiHeader.biBitCount;
bitmap.bmWidthBytes = ((bitmap.bmWidth * bitmap.bmBitsPixel + 31)
>> 5) << 2;
bitmap.bmBits = new BYTE[bitmap.bmHeight * bitmap.bmWidthBytes];
memcpy(bitmap.bmBits, pbtImage + bmfh.bfOffBits, bitmap.bmHeight *
bitmap.bmWidthBytes);
delete [] pbtImage;
}
if (nRc < 0)
wprintf(L"Error %d", nRc);
8.36.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.24.
None = 0x0000,
Timestamp = 0x0001,
BackImage = 0x0002,
ExcludeHotSpots = 0x0004,
DontCrop = 0x0008,
AlignLeft = 0x0010,
AlignRight = 0x0020,
AlignTop = 0x0040,
AlignBottom = 0x0080,
TimestampRelToImage = 0x0100,
DontSmooth = 0x0200,
Smooth = 0x0400,
OverlayImage = 0x0800,
TransparentBack = 0x1000,
CurrentImages = 0x2000,
VariablePenWidth = 0x4000
Bitmap bitmap;
try
{
bitmap = stPad.SignatureSaveAsStreamEx(300, 0, 0, 0,
Color.FromArgb(0, 0, 255), SignatureImageFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.SignatureSaveAsFileEx("C:/Signature.tif", 300, 0, 0,
ImageFormat.Tiff, 0, Color.FromArgb(0, 0, 255),
SignatureImageFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SignatureSaveAsFileEx("C:/Signature.tif", 300, 0, 0, _
ImageFormat.Tiff, 0, Color.FromArgb(0, 0, 255), _
SignatureImageFlag.None)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureGetBounds method
This method delivers the coordinates of the rectangle in which the captured signature is given.
8.37.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The status described is available from Version 8.3.1.
8.37.1.1 Implementation in C#
8.37.2 STPadLib.dll
The following values defined in the header file can be used for the nOptions parameter:
#define STPAD_BOUNDS_DISPLAY 0
#define STPAD_BOUNDS_SIGNRECT 1
8.37.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.1.
void SignatureGetBounds(out int left, out int top, out int right, out int
bottom, signotec.STPadLibNet.SignatureBoundsOption options)
Sub SignatureGetBounds(ByRef left As Integer, ByRef top As Integer, ByRef right
As Integer, ByRef bottom As Integer, ByVal options As
signotec.STPadLibNet.SignatureBoundsOption)
DisplayRelative = 0,
SignRectRelative = 1
try
{
int nLeft, nTop, nRight, nBottom;
stPad.SignatureGetBounds(out nLeft, out nTop, out nRight, out
nBottom, SignatureBoundsOption.DisplayRelative);
MessageBox.Show(String.Format("The Bounds of the Signature are: " +
"{0} (left), {1} (top), {2} (right) " +
"&& {3} (bottom).", nLeft, nTop, nRight, nBottom));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nLeft, nTop, nRight, nBottom As Integer
STPad.SignatureGetBounds(nLeft, nTop, nRight, nBottom,
SignatureBoundsOption.DisplayRelative)
MsgBox("The Bounds of the Signature are:" + CStr(nLeft) + _
" (left), " + CStr(nTop) + " (top), " + CStr(nRight) + _
" (right) && " + CStr(nBottom) + " (bottom).")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
SignatureScaleToDisplay method
8.38.1 STPadCapt.ocx
8.38.2 STPadLib.dll
8.38.3 STPadLibNet.dll
8.38.3.1 Implementation in C#
try
{
MessageBox.Show(String.Format("Display Value: {0}",
stPad.SignatureScaleToDisplay(1000)));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
MsgBox("Display Value:" + CStr(STPad.SignatureScaleToDisplay(1000)))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method erases both the foreground and the background buffer and removes the overlay
rectangle if set. Thus the entire contents of the LCD is erased. Depending on the value of the
ControlMirrorDisplay property the content is also deleted from the control element. To
erase only parts of the memory defined with DisplaySetTarget(), please use
DisplayEraseRect().
8.39.1 STPadCapt.ocx
LONG DisplayErase()
8.39.1.1 Implementation in C#
8.39.2 STPadLib.dll
LONG STDisplayErase()
8.39.3 STPadLibNet.dll
void DisplayErase()
Sub DisplayErase()
try
{
stPad.DisplayErase();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplayErase()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayEraseRect method
This method erases a rectangle in the memory defined with DisplaySetTarget(). If erasing
is performed on the display and if the ControlMirrorDisplay property is set to 2, the
rectangle is also erased in the control element.
8.40.1 STPadCapt.ocx
Available from Version 8.0.16 onwards. The status described is available from Version 8.3.1.
8.40.2 STPadLib.dll
8.40.3 STPadLibNet.dll
8.40.3.1 Implementation in C#
try
{
stPad.DisplayEraseRect(10, 50, 30, 20);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplayEraseRect(10, 50, 30, 20)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayConfigPen method
This method sets the pen width and colour used to display a signature on the LCD. The pen
width is always stored permanently in the device; the pen colour is stored permanently only
on Omega devices with firmware 1.4 or later.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 100 of 226
Parameter Values I/O Description
LONG nWidth 1 – 3 I Width in pixels
int width
ByVal width As
Integer
OLE_COLOR clrPen >= 0 I Colour; this parameter is ignored for the Sigma
COLORREF clrPen model
Color penColor
ByVal penColor As
Color
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.41.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The status described is available from Version 8.3.1.
8.41.1.1 Implementation in C#
8.41.2 STPadLib.dll
8.41.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 101 of 226
8.41.3.1 Implementation in C#
try
{
stPad.DisplayConfigPen(2, Color.FromArgb(0, 0, 255));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplayConfigPen(2, Color.FromArgb(0, 0, 255))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetFont method
This method permanently sets the font that is used to output text to the LCD. Text that has
already been output is not modified. Arial 20 pt (Sigma model) or 40 pt (Omega, Gamma,
Delta and Alpha models) is set when DeviceOpen() is called.
8.42.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
8.42.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 102 of 226
8.42.1.2 Implementation in Visual Basic
8.42.2 STPadLib.dll
The following values defined in the header file can be used for the nOptions parameter:
8.42.3 STPadLibNet.dll
8.42.3.1 Implementation in C#
try
{
stPad.DisplaySetFont(new Font("Arial", 20, FontStyle.Regular));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetFont(New Font("Arial", 20, FontStyle.Regular))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetFontColor method
This method permanently sets the colour in which the text is displayed on the LCD. Text that
has already been output is not modified. The given values will be ignored, if a pad without a
color LCD is used. The colour black is set when the component is initialised.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 103 of 226
Parameter Values I/O Description
OLE_COLOR clrFont >= 0 I Text colour
COLORREF clrFont
Color fontColor
ByVal fontColor As
Color
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.43.1 STPadCapt.ocx
8.43.1.1 Implementation in C#
8.43.2 STPadLib.dll
8.43.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 104 of 226
8.43.3.1 Implementation in C#
try
{
stPad.DisplaySetFontColor(Color.FromArgb(238, 121, 0));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetFontColor(Color.FromArgb(238, 121, 0))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetTarget method
This method defines the device memory that is used by the following methods and properties:
DisplayEraseRect(), DisplaySetText(), DisplaySetTextInRect(), DisplaySetImage(),
DisplaySetImageFromFile(), DisplaySetImageFromStore(), DisplaySetScrollPos(),
DisplayGetScrollPos(), DisplayTargetWidth and DisplayTargetHeight. The set memory
remains valid until the next call of this method or of DeviceClose(). Contents stored in a
non-visible memory can be displayed with the DisplaySetImageFromStore() method. For
more details, see Chapter 6.
After the calling of DeviceOpen(), the methods specified above are all executed directly on
the LCD (foreground buffer) as long as DisplaySetTarget() is not called.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 105 of 226
1 I All content is written to the non-visible
background buffer; the background buffer is
used internally during the signature process, so
content is no longer available after
SignatureStart() has been called; the
content is also lost if the device is switched off
or if DisplayErase()or DeviceClose() is
called
2 I All content is written to the overlay buffer; it is
visible immediately if an overlay rectangle has
already been defined; the content is lost if the
device is switched off or if DisplayErase()or
DeviceClose() is called; this value cannot be
used for the Sigma model
1000 I A virtual memory is used in the API;
RSACreateDisplayHash() can then be called in
order to transfer the content of the memory to
the signature device in an optimal manner
I Enables direct access to a permanent storage;
other The storage must be reserved before it can be
used (see above for value -1 and -2)
Return value Values Description
LONG >= 0 ID of the store which is now selected; all the above
DisplayTarget referred methods will now be applied to this store;
this ID can be used when calling this method again to
specifically address this store
< 0 Error (not STPadLibNet.dll)
8.44.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The described state is available as of Version 8.1.0.
8.44.1.1 Implementation in C#
8.44.2 STPadLib.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.0.
The following values defined in the header file can be used for the nTarget parameter:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 106 of 226
#define STPAD_TARGET_LARGESTORE -2
#define STPAD_TARGET_STANDARDSTORE -1
#define STPAD_TARGET_FOREGROUND 0
#define STPAD_TARGET_BACKGROUND 1
#define STPAD_TARGET_OVERLAY 2
#define STPAD_TARGET_DISPLAYHASH 1000
8.44.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The described state is available as of Version 8.1.0.
signotec.STPadLibNet.DisplayTarget
DisplaySetTarget(signotec.STPadLibNet.DisplayTarget target)
Function DisplaySetTarget(ByVal target As signotec.STPadLibNet.DisplayTarget)
As signotec.STPadLibNet.DisplayTarget
NewLargeStore = -2,
NewStandardStore = -1,
ForegroundBuffer = 0,
BackgroundBuffer = 1,
OverlayBuffer = 2,
Reserved1 = 3,
Reserved2 = 4,
Reserved3 = 5,
Reserved4 = 6,
Reserved5 = 7,
Reserved6 = 8,
Reserved7 = 9,
Reserved8 = 10,
Reserved9 = 11,
Reserved10 = 12,
Reserved11 = 13,
DisplayHashBuffer = 1000
8.44.3.1 Implementation in C#
try
{
DisplayTarget nStoreId = DisplayTarget.NewStandardStore;
nStoreId = stPad.DisplaySetTarget(nStoreId);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 107 of 226
8.44.3.2 Implementation in Visual Basic
Try
Dim nStoreId As DisplayTarget = DisplayTarget.NewStandardStore
nStoreId = STPad.DisplaySetTarget(nStoreId)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetText method
This method can be used to write any text to the memory defined with the
DisplaySetTarget() method. The rectangle enclosing the text overlays existing information
in the memory. The text is also displayed in the control element if the output is made on the
display and if the ControlMirrorDisplay property is set to 2. The text can also appear
outside of the display and it is not wrapped unless it already contains breaks. Arial 20 pt
(Sigma model) or 40 pt (Omega, Gamma, Delta and Alpha models) is used, unless another
font has been set using DisplaySetFont(). The colour of the text will be black unless another
colour has been set using DisplaySetFontColor().
8.45.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 108 of 226
8.45.1.1 Implementation in C#
8.45.2 STPadLib.dll
kLeft = 0,
kCenter = 1,
kRight = 2,
kLeftCenteredVertically = 3,
kCenterCenteredVertically = 4,
kRightCenteredVertically = 5
8.45.3 STPadLibNet.dll
Left = 0,
Center = 1,
Right = 2,
LeftCenteredVertically = 3,
CenterCenteredVertically = 4,
RightCenteredVertically = 5
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 109 of 226
8.45.3.1 Implementation in C#
try
{
stPad.DisplaySetText(50, 20, TextAlignment.Left, "Text");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetText(50, 20, TextAlignment.Left, "Text")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetTextInRect method
This method can be used to write any text to the memory defined with the
DisplaySetTarget() method. The specified rectangle overlays existing information in the
memory. The text is also displayed in the control element if the output is made on the display
and if the ControlMirrorDisplay property is set to 2. The text is placed in the rectangle and
can optionally be wrapped automatically. No check is made regarding whether the rectangle is
within the display. Arial 20 pt (Sigma model) or 40 pt (Omega, Gamma, Delta and Alpha
models) is used, unless another font has been set using DisplaySetFont(). If the text is too
long, the font size is automatically reduced to a minimum of 12 pt (see also options
parameter). The colour of the text will be black unless another colour has been set using
DisplaySetFontColor().
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 110 of 226
LONG nAlignment 0 I Text is left-aligned and wrapped automatically
ALIGN nAlignment 1 I Text is centred and wrapped automatically
2 I Text is right-aligned and wrapped automatically
TextAlignment 3 I Text is left-aligned and centred vertically in the
alignment
rectangle with no wrapping (breaks are
ByVal alignment As ignored)
TextAlignment 4 I Text is centred vertically and horizontally in the
rectangle with no wrapping (breaks are
ignored); this setting is ideal for button text
5 I Text is right-aligned and centred vertically in
the rectangle with no wrapping (breaks are
ignored)
6 I Text is left-aligned and not wrapped
automatically (breaks are retained)
7 I Text is centred and not wrapped automatically
(breaks are retained)
8 I Text is right-aligned and not wrapped
automatically (breaks are retained)
BSTR bstrText != I Text to be output
NULL
LPCWSTR szText
string text
ByVal text As
String
VARIANT nOptions Bitmask containing one or more hexadecimal values from the
LONG nOptions following list (optional):
0x01 I Instead of the font size, the height of the text
TextFlag options block in pixels is returned; if the text does not
ByVal options As fit in the given rectangle, it is not output, and
TextFlag the height that is necessary to output the text
in the desired font size is returned; an error is
returned if the longest word in the text does
not fit in a line of the given rectangle.
Return value Values Description
LONG >=0 The font size that is actually used or the height of the
int text in pixels (see also options parameter)
< 0 Error (not STPadLibNet.dll)
Integer
8.46.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.4.1.9.
8.46.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 111 of 226
8.46.1.2 Implementation in Visual Basic
8.46.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.9.
kLeft = 0,
kCenter = 1,
kRight = 2,
kLeftCenteredVertically = 3,
kCenterCenteredVertically = 4,
kRightCenteredVertically = 5,
kLeftNoWrap = 6,
kCenterNoWrap = 7,
kRightNoWrap = 8
The following values defined in the header file can be used for the nOptions parameter:
8.46.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.9.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 112 of 226
Left = 0,
Center = 1,
Right = 2,
LeftCenteredVertically = 3,
CenterCenteredVertically = 4,
RightCenteredVertically = 5,
LeftNoWrap = 6,
CenterNoWrap = 7,
RightNoWrap = 8
None = 0,
NoResize = 1
8.46.3.1 Implementation in C#
try
{
stPad.DisplaySetTextInRect(0, 0, 20, 40, TextAlignment.Left, "Text");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetTextInRect(0, 0, 20, 40, TextAlignment.Left, "Text")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method can be used to write an image to the memory defined with the
DisplaySetTarget() method. Although the colour depth is automatically adjusted to the
connected LCD, it is still advisable to correctly generate the image beforehand (for example, a
1-bit monochrome image is required for the Sigma model). If there is an existing Alpha
channel, it is ignored. The transfer time for the Omega, Gamma, Delta and Alpha models
depends on the image material; the best pictures have few colours, so they can be
compressed well. The image overlays the existing information in the memory and any
signature that is present is completely erased. The text is also displayed in the control
element if the output is made on the display and if the ControlMirrorDisplay property is set
to 2. The image may also be positioned outside of the display.
8.47.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
8.47.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 114 of 226
Work with files:
8.47.2 STPadLib.dll
8.47.3 STPadLibNet.dll
8.47.3.1 Implementation in C#
try
{
Bitmap bitmap = (Bitmap)Bitmap.FromFile(@"C:\Image.bmp");
stPad.DisplaySetImage(0, 0, bitmap);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 115 of 226
Work with files:
try
{
stPad.DisplaySetImageFromFile(0, 0, @"C:\Image.bmp");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim bitmap As Bitmap = Bitmap.FromFile("C:\Image.bmp")
STPad.DisplaySetImage(0, 0, bitmap)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
Try
STPad.DisplaySetImageFromFile(0, 0, "C:\Image.bmp")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetPDF method
This method can be used to write a page of a PDF document or an excerpt thereof to the
memory defined with the DisplaySetTarget() method. The image overlays the existing
information in the memory and any signature that is present is completely erased. The text is
also displayed in the control element if the output is made on the display and if the
ControlMirrorDisplay property is set to 2. The image may also be positioned outside of the
display.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 116 of 226
DOUBLE dScale > 0 I Page is scaled; a value of 1 produces a display
double scale in original size
ByVal scale As
Double
LONG nOptions Bitmask containing one or more hexadecimal values from the
PdfFlag options following list:
0x01 I The image transferred to the signature device
ByVal options As is stored in the main memory of the PC and
PdfFlag
therefore does not have to be rendered again
for repeated display.
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.48.1 STPadCapt.ocx
LONG DisplaySetPDF(LONG nXPos, LONG nYPos, LONG nPage, DOUBLE dScale, LONG
nOptions)
8.48.1.1 Implementation in C#
8.48.2 STPadLib.dll
LONG STDisplaySetPDF(LONG nXPos, LONG nYPos, LONG nPage, DOUBLE dScale, LONG
nOptions)
The following values defined in the header file can be used for the nOptions parameter:
8.48.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 117 of 226
void DisplaySetPDF(int xPos, int yPos, int page, double scale, PdfFlag options)
Sub DisplaySetPDF(ByVal xPos As Integer, ByVal yPos As Integer, ByVal page As
Integer, ByVal scale As Double, ByVal options As PdfFlag)
None = 0,
Cache = 1
8.48.3.1 Implementation in C#
try
{
stPad.DisplaySetPDF(0, 0, 1, 1., PdfFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetPDF(0, 0, 1, 1R, PdfFlag.None)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetImageFromStore method
This method allows an image that has been stored in a device memory to be written to the
memory defined by DisplaySetTarget(). The content to copy will overlay the content which
is currently stored in the target storage. For more details, see Chapter 6.
The scroll position of the source memory will be assigned to the destination memory, if both
have the same size, else it will be set to 0 / 0.
The image is also displayed in the control element if the output is made to the display and if
the ControlMirrorDisplay property is set to 2.
ByVal storeId As
DisplayTarget
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 118 of 226
Return value Values Description
LONG other The memory defined by nStoreId has not been
int reserved beforehand; the content was successfully
copied, but is not available within the component; the
Integer returned value is identical to the value of nStoreId
0 Method was executed successfully
< 0 Error (not STPadLibNet.dll)
8.49.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The described state is available as of Version 8.0.19.
8.49.1.1 Implementation in C#
8.49.2 STPadLib.dll
The following values defined in the header file or the ID of a reserved, non-volatile memory
can be used for the nStoreId parameter:
#define STPAD_TARGET_FOREGROUND 0
#define STPAD_TARGET_BACKGROUND 1
8.49.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 119 of 226
ForegroundBuffer = 0,
BackgroundBuffer = 1,
OverlayBuffer = 2,
Reserved1 = 3,
Reserved2 = 4,
Reserved3 = 5,
Reserved4 = 6,
Reserved5 = 7,
Reserved6 = 8,
Reserved7 = 9,
Reserved8 = 10,
Reserved9 = 11,
Reserved10 = 12,
Reserved11 = 13
8.49.3.1 Implementation in C#
try
{
stPad.DisplaySetImageFromStore(DisplayTarget.BackgroundBuffer);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetImageFromStore(DisplayTarget.BackgroundBuffer);
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetOverlayRect method
This method defines a rectangular subarea of the display whose contents will be covered by
the contents of the overlay buffer. The foreground buffer is covered within this rectangle until
it is removed again or until DisplayErase(), SignatureConfirm() or SignatureCancel() is
called. This functionality is ideal for a toolbar that displays hotspots, for example, to scroll.
If the storage defined with DisplaySetTarget() is not the foreground buffer, the rectangle is
not set until DisplaySetImageFromStore() (with the foreground buffer as the destination) is
called to synchronize the display.
The parameters must be multiples of eight when using Omega (with firmware 1.x) and Alpha
models and are rounded if necessary.
This method cannot be called when a both a standard hotpot lying outside of the given
rectangle and a scroll hotspot has been defined previously.
This method only works with the Omega, Gamma, Delta and Alpha models!
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 120 of 226
Parameter Values I/O Description
LONG nLeft >= 0 I Left boundary; 0 is on the far left of the display
int left
ByVal left As
Integer
LONG nTop >= 0 I Upper boundary; 0 is at the top of the display
int top
ByVal top As
Integer
LONG nWidth >= 8 IWidth; DisplayWidth holds the width of the
int width LCD used
0 I The overlay rectangle is removed; the
ByVal width As
complete contents of the foreground buffer will
Integer
be visible again
LONG nHeight >= 8 I Height; DisplayHeight holds the height of the
int height LCD used
0 I The overlay rectangle is removed; the
ByVal height As
complete contents of the foreground buffer will
Integer
be visible again
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.50.1 STPadCapt.ocx
Available from Version 8.0.17 onwards. The status described is available from Version 8.4.0.
8.50.1.1 Implementation in C#
8.50.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.0.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 121 of 226
8.50.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.0.
8.50.3.1 Implementation in C#
try
{
stPad.DisplaySetOverlayRect(0, 400, 640, 80);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetOverlayRect(0, 400, 640, 80);
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetScrollPos method
This method defines the X/Y position where the contents of the storage defined with
DisplaySetTarget() will be displayed. This method only works for image memories with a
size larger than the display size. Please refer to the descriptions of the properties
DisplayTargetWidth and DisplayTargetHeight.
8.51.1 STPadCapt.ocx
Available from Version 8.0.17 onwards. The status described is available from Version 8.4.1.5.
8.51.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
8.51.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.5.
8.51.3.1 Implementation in C#
try
{
stPad.DisplaySetOverlayRect(0, 400, 640, 80);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetOverlayRect(0, 400, 640, 80);
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayGetScrollPos method
This method returns the X/Y position where the contents of the memory defined with
DisplaySetTarget() are displayed.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 123 of 226
Parameter Values I/O Description
LONG* pnXPos != O Horizontal offset of the memory contents to the
NULL left, in pixels
out int xPos
ByRef xPos As
Integer
LONG* pnYPos != O Vertical offset of the memory contents to the
NULL top, in pixels
out int yPos
ByRef yPos As
Integer
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.52.1 STPadCapt.ocx
8.52.1.1 Implementation in C#
8.52.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 124 of 226
8.52.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.1.
8.52.3.1 Implementation in C#
try
{
int nXPos, nYPos;
stPad.DisplayGetScrollPos(out nXPos, out nYPos);
MessageBox.Show(String.Format("Scroll pos: {0} / {1}", nXpos, nYPos);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nXPos, nYPos As Integer
STPad.DisplayGetScrollPos(nXpos, nYPos)
MsgBox("Scroll pos: " & CStr(nXPos) & " / " & CStr(nYPos))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method can be used to retrieve the content of an image memory as image data in the
memory or save it as an image file on the hard drive. Any existing signature will be ignored
for saving. The image has the size and resolution of the screen on the device used and,
depending on the option, the size of the screen or image memory. The colour depth depends
on the file type and the device used.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 125 of 226
LONG nFileType 0 I Use TIFF with CCITT4 compression (b/w
FILETYPE nFileType image) or LZW compression (colour image) as
the file format (recommended)
1 I Use PNG file format
2 I Use BMP file format
3 I Use JPEG with a quality setting of 75 as the file
format
4 I Use GIF file format (the resolution will always
be 96 ppi)
200 - I Image data is not returned as binary data, but
204 as Base64 encoded data; otherwise as values
0–4 (STPadCapt.ocx and
DisplaySaveImageAsStream() only)
LONG nOptions Bitmask containing one or more hexadecimal values from the
DisplayImageFlag following list:
options 0x01 I The whole content of the display will be stored;
The hotspot areas (buttons) stay white in this
ByVal options As
mode.
DisplayImageFlag
0x02 I Instead of the current display content the
content of the whole foreground buffer without
the overlay rectangle is saved
0x04 I Instead of the current display content, the
content of the entire memory defined
beforehand with DisplaySetTarget() is
saved.
Return value Values Description
VARIANT empty Error
other Image data as array of Bytes or Base64-coded String
LONG 0 Method was executed successfully
< 0 Error
Bitmap != Image as System.Drawing.Bitmap
NULL
8.53.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The status described is available from Version 8.3.2.
8.53.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 126 of 226
Work with files:
8.53.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.2.
kTiff = 0,
kPng = 1,
kBmp = 2,
kJpeg = 3,
kGif = 4
The following values defined in the header file can be used for the nOptions parameter:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 127 of 226
8.53.2.1 Implementation in C++
LONG nSize = 0;
LONG nRc = STDisplaySaveImageAsStream(NULL, &nSize, kBmp, 0);
BYTE* pbtImage = NULL;
BITMAP bitmap;
if (nRc == 0)
{
pbtImage = new BYTE[nSize];
nRc = STDisplaySaveImageAsStream(pbtImage, &nSize, kBmp, 0);
}
if (nRc == 0)
{
BITMAPFILEHEADER bmfh = (*(BITMAPFILEHEADER*)pbtImage);
BITMAPINFO bmi = (*(BITMAPINFO*)(pbtImage +
sizeof(BITMAPFILEHEADER)));
bitmap.bmType = 0;
bitmap.bmWidth = bmi.bmiHeader.biWidth;
bitmap.bmHeight = bmi.bmiHeader.biHeight;
bitmap.bmPlanes = bmi.bmiHeader.biPlanes;
bitmap.bmBitsPixel = bmi.bmiHeader.biBitCount;
bitmap.bmWidthBytes = ((bitmap.bmWidth * bitmap.bmBitsPixel + 31)
>> 5) << 2;
bitmap.bmBits = new BYTE[bitmap.bmHeight * bitmap.bmWidthBytes];
memcpy(bitmap.bmBits, pbtImage + bmfh.bfOffBits, bitmap.bmHeight *
bitmap.bmWidthBytes);
delete [] pbtImage;
}
if (nRc < 0)
wprintf(L"Error %d", nRc);
8.53.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.2.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 128 of 226
None = 0,
ExcludeHotSpots = 1,
CompleteBuffer = 2,
CurrentTarget = 4
8.53.3.1 Implementation in C#
Bitmap bitmap;
try
{
bitmap = stPad.DisplaySaveImageAsStream(DisplayImageFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.DisplaySaveImageAsFile(@"C:\Image.tif", ImageFormat.Tiff,
DisplayImageFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySaveImageAsFile("C:\Image.tif", ImageFormat.Tiff, _
DisplayImageFlag.None)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method permanently stores an image in the selected device. The image is automatically
displayed when a connection to the device has not yet been opened (while a connection is
being established, for example). Although the colour depth is automatically adjusted to the
connected LCD, it is still advisable to correctly generate the image beforehand (for example, a
1-bit monochrome image is required for the Sigma model). If there is an existing Alpha
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 129 of 226
channel, it is ignored. If the image is too small, it is centred. If the image is too large, it is
cropped on the right and at the bottom.
The image is only transmitted when the memory management determines that the image is
not yet stored in the device. A slide show configuration is removed by calling this method.
8.54.1 STPadCapt.ocx
8.54.1.1 Implementation in C#
int nResult;
nResult = axSTPadCapt1.DisplaySetStandbyImageFromFile(@"C:\Image.bmp");
if (nResult < 0)
MessageBox.Show(String.Format("Error {0}", nResult);
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 130 of 226
8.54.1.2 Implementation in Visual Basic
8.54.2 STPadLib.dll
8.54.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 131 of 226
8.54.3.1 Implementation in C#
try
{
Bitmap bitmap = (Bitmap)Bitmap.FromFile(@"C:\Image.bmp");
stPad.DisplaySetStandbyImage(bitmap);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.DisplaySetStandbyImageFromFile(@"C:\Image.bmp");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim bitmap As Bitmap = Bitmap.FromFile("C:\Image.bmp")
STPad.DisplaySetStandbyImage(bitmap)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
Try
STPad.DisplaySetStandbyImageFromFile("C:\Image.bmp")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayConfigSlideShow method
With this method, a slide show of permanently stored images can be configured to be played
automatically on the target device, if the device is not in use. A possibly saved standby image
is removed.
This method only works with the Omega, Gamma, Delta and Alpha models. It is necessary to
use the DisplayConfigSlideShowEx() method in order to fully exploit the functionality of the
Gamma and Delta models.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 132 of 226
Parameter Values I/O Description
BSTR bstrSlideList NULL, I The slide show will be disabled
""
LPCWSTR
szSlideList other I A list of up to 16 (Gamma up to firmware 1.9
and Delta up to firmware 1.7) or 32 (Omega,
string slideList Gamma from firmware 1.10, Delta from
ByVal slideList As firmware 1.8 and Alpha) IDs of image stores
String separated by semicolons; these IDs must be
reserved previously by the
DisplaySetTarget() method and must be
filled with text or images; an ID of an image
store can be included multiple times; the ID 35
cannot be used for a slide show; the slide show
will be displayed in the given order.
LONG nDuration 100 - I Time in milliseconds that each image is
30000 displayed; a maximum value of 255000 can be
int duration
0 passed for the Gamma and Delta models.
ByVal duration As
Integer
Return value Values Description
LONG >= 0 Number of images in the slide show
int < 0 Error (not STPadLibNet.dll)
Integer
8.55.1 STPadCapt.ocx
Available from Version 8.0.11 onwards. The status described is available from Version
8.4.1.10.
8.55.1.1 Implementation in C#
8.55.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version
8.4.1.10.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 133 of 226
8.55.2.1 Implementation in C++
8.55.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version
8.4.1.10.
8.55.3.1 Implementation in C#
try
{
stPad.DisplayConfigSlideShow("5;6;8;5;7", 2000);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplayConfigSlideShow("5;6;8;5;7", 2000);
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayConfigSlideShowEx method
With this method, a slide show of permanently stored images can be configured to be played
automatically on the target device, if the device is not in use. A possibly saved standby image
is removed.
This method only offers the functionality of the DisplayConfigSlideShow() method with the
Omega (up to firmware 1.40) and Alpha models.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 134 of 226
Parameter Values I/O Description
BSTR bstrSlideList NULL, I The slide show will be disabled
""
LPCWSTR
szSlideList other IA list of up to 16 (Gamma up to firmware 1.9
and Delta up to firmware 1.7) or 32 (Omega,
string slideList Gamma from firmware 1.10, Delta from
ByVal slideList As firmware 1.8 and Alpha) IDs of image stores
String separated by semicolons; these IDs must have
been previously reserved through the
DisplaySetTarget() method and must have
been filled with text or images; an ID of an
image store can be included multiple times; the
ID 35 cannot be used for a slide show; the
slide show will be displayed in the given order;
a negative number can also be included when
using the Omega (from firmware 2.0), Gamma
and Delta models, the image from the Store ID
that corresponds to the absolute value of this
number will then only be displayed during the
first run of the slide show; a value of 0 can also
be included with the Omega (from firmware
2.0), Gamma and Delta models, the slide show
will then end at this point and the backlight will
be disabled.
BSTR 100 - I A list of a maximum of one (Omega up to
bstrDurationList 30000 firmware 1.40 and Alpha) or 16 (Omega from
0 firmware 2.0, Gamma up to firmware 1.9 and
LPCWSTR
szDurationList Delta up to firmware 1.7) or 32 (Gamma from
firmware 1.10 and Delta from firmware 1.8)
string
times in milliseconds separated by semicolon
durationList
for which each individual image is to be
ByVal durationList displayed; if this list contains fewer values than
As String the list of Store IDs, the last value in the list is
used for all further images; permitted values
are all those from "100" to "255000" for the
Gamma and Delta models and "300000" for all
other models.
Return value Values Description
LONG >= 0 Number of images in the slide show
int < 0 Error (not STPadLibNet.dll)
Integer
8.56.1 STPadCapt.ocx
Available from Version 8.2.0. The status described is available from Version 8.4.1.10.
8.56.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 135 of 226
8.56.1.2 Implementation in Visual Basic
8.56.2 STPadLib.dll
Available from Version 8.2.0. The status described is available from Version 8.4.1.10.
8.56.3 STPadLibNet.dll
Available from Version 8.2.0. The status described is available from Version 8.4.1.10.
8.56.3.1 Implementation in C#
try
{
stPad.DisplayConfigSlideShow("-5;6;8;6;7;0",
"5000;1000;2000;1000;2000");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplayConfigSlideShow("-5;6;8;6;7;0",
"5000;1000;2000;1000;2000");
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplayGetStandbyId method
This method returns the number of images configured for standby operation, as well as a
hexadecimal character string that identifies the standby image currently set or the slide show
currently configured. Thus it can be checked, for example, whether the current configuration
matches the desired one.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 136 of 226
Parameter Values I/O Description
BSTR* pbstrId != O Unique string the identifies the current
NULL configuration
out string id
ByRef id As String
LPCWSTR szId NULL IThe method returns the length of the character
string in the pnStringLength parameter
!= I/O Array in which the character string that
NULL identifies the current configuration is written; if
the array is too small, the end characters are
cut off
LONG* >= 0 I/O Length of the character string or size of the
pnStringLength szId array in bytes
Return value Values Description
LONG >= 0 Number of reserved permanent stores used for the
int standby image or the slide show
< 0 Error
Integer
8.57.1 STPadCapt.ocx
Available from Version 8.0.16 onwards. The status described is available from Version 8.2.0.
8.57.1.1 Implementation in C#
8.57.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.4.1.4.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 137 of 226
8.57.2.1 Implementation in C++
LONG nLen = 0;
LONG nRc = STDisplayGetStandbyId(NULL, &nLen);
if (nRc == 0)
wprintf(L"No standby mode configured!");
else if (nRc > 0)
{
WCHAR* szId = new WCHAR[nLen / sizeof(WCHAR)];
nRc = STDisplayGetStandbyId(szId, &nLen);
if (nRc > 0)
wprintf(L"%d stores configured, ID is: %s", nRc, szId);
delete [] szId;
}
if (nRc < 0)
wprintf(L"Error %d", nRc);
8.57.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.3.1.
8.57.3.1 Implementation in C#
try
{
string strId = "";
int nCount = stPad.DisplayGetStandbyId(out strId);
if (nCount == 0)
MessageBox.Show(String.Format("No standby mode configured!"));
else
MessageBox.Show(String.Format("{0} stores configured, ID is: " +
"{1}", nCount, strId));
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim strId As String = ""
Dim nCount As Integer = STPad.DisplayGetStandbyId(strId)
If nCount = 0 Then
MsgBox("No standby mode configured!")
Else
MsgBox(CStr(nCount) & " stores configured, ID is: " & strId)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
DisplaySetBacklight method
This method controls the display backlight. The backlight is always set to the default value
when the device is switched on. A default behaviour for opening and closing can be
additionally defined in the STPad.ini file (see there for details).
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 138 of 226
With the Sigma model this method only works from firmware 1.10. With the Omega model, it
only works from firmware 1.7. In Omega models with a firmware version that is older than
1.12, the values 1, 2 and 3 all set the default brightness.
8.58.1 STPadCapt.ocx
Available from Version 8.0.16 onwards. The status described is available from Version 8.3.1.
8.58.1.1 Implementation in C#
8.58.2 STPadLib.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.21.
kOff = 0,
kOn = 1,
kMedium = 2,
kMaximum = 3
8.58.3 STPadLibNet.dll
Available from Version 8.0.19 onwards. The status described is available from Version 8.0.21.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 139 of 226
void DisplaySetBacklight(signotec.STPadLibNet.BacklightMode mode)
Sub DisplaySetBacklight(ByVal mode As signotec.STPadLibNet.BacklightMode)
Off = 0,
On = 1,
Medium = 2,
Maximum = 3
8.58.3.1 Implementation in C#
try
{
stPad.DisplaySetBacklightMode(BacklightMode.Off);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.DisplaySetBacklightMode(BacklightMode.Off)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
ControlSetLogDirectory method
This method allows logging to be controlled in any folder regardless of the settings in the
STPad.ini file (depending on the component, the LogSTPadCapt, LogSTPadLib or
LogSTPadLibNet keys). The component must have write permissions in this folder. Accessing
this method always closes the current log file. If a valid path is transferred, information is
immediately written to an existing or new log file in the specified folder.
8.59.1 STPadCapt.ocx
Available from Version 8.0.21.12 onwards. The status described is available from Version
8.4.1.5.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 140 of 226
8.59.1.1 Implementation in C#
8.59.2 STPadLib.dll
Available from Version 8.0.21.12 onwards. The status described is available from Version
8.4.1.5.
8.59.3 STPadLibNet.dll
Available from Version 8.0.21.12 onwards. The status described is available from Version
8.4.1.5.
8.59.3.1 Implementation in C#
try
{
stPad.ControlSetLogDirectory("%USERPROFILE%");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.ControlSetLogDirectory("%USERPROFILE%")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
ControlGetVersion method
This method erases the captured signature data and the displayed signature as well as all
bitmaps and text in the control element’s window.
8.61.1 STPadCapt.ocx
LONG ControlErase()
8.61.1.1 Implementation in C#
8.61.2 STPadLib.dll
Not available.
8.61.3 STPadLibNet.dll
void ControlErase()
Sub ControlErase()
8.61.3.1 Implementation in C#
try
{
stPad.ControlErase();
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 142 of 226
8.61.3.2 Implementation in Visual Basic
Try
STPad.ControlErase()
Catch ex As STPadException
MsgBox(ex.Message)
End Try
ControlSetHotspotMode method
This method can be used to change the behaviour of a monitored area (hotspot) in the control
element if the ControlMirrorDisplay property is set to four (interactive). The mode set by
SensorSetHotSpotMode() always takes priority; operating a hotspot deactivated there in the
control element is therefore never possible.
8.62.1 STPadCapt.ocx
Available from Version 8.1.2 onwards. The status described is available from Version 8.3.1.
8.62.1.1 Implementation in C#
8.62.2 STPadLib.dll
Not available.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 143 of 226
8.62.3 STPadLibNet.dll
Inactive = 0,
Active = 1,
InvertOff = 2
8.62.3.1 Implementation in C#
try
{
stPad.SensorSetHotspotMode(HotSpotMode.Inactive, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.SensorSetHotspotMode(HotSpotMode.Inactive, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
ControlGetErrorString method
This method returns an error description in German, English, French or Italian, depending on
the system language.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 144 of 226
8.63.1 STPadCapt.ocx
8.63.1.1 Implementation in C#
8.63.2 STPadLib.dll
LONG nLen = 0;
LONG nRc = STControlGetErrorString(NULL, &nLen, 0);
if (nRc == 0)
{
WCHAR* szError = new WCHAR[nLen / sizeof(WCHAR)];
nRc = STControlGetErrorString(szError, &nLen, 0);
if (nRc == 0)
wprintf(szError);
delete [] szError;
}
8.63.3 STPadLibNet.dll
Not available. Please use the Message property of the STPadException instead.
ControlSetSTPadLib method
This method allows an instance of the STPadLib class to be passed that is to be used by the
STPadLibControl class to communicate with signotec LCD pads. It can be called at any time.
For example, a STPadLibControl object can be used to alternately display the screen content
of two different devices that are each opened in a STPadLib object. After assignment, it makes
no difference whether the methods and properties of the STPadLib or STPadLibControl
instance are used.
This method should only be used if a separate instance of the STPadLib class is used.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 145 of 226
Parameter Values I/O
Description
STPadLib stPadLib != IThe STPadLib object to be used for
NULL communication
NULL I The currently used STPadLib object is removed
and destroyed (provided it was created
internally); the control element will use a new
internal instance of the STPadLib class for
communication purposes
Return value Values Description
- - -
8.64.1 STPadCapt.ocx
Not available.
8.64.2 STPadLib.dll
Not available.
8.64.3 STPadLibNet.dll
8.64.3.1 Implementation in C#
ControlSetCallback method
This method defines a callback routine that is called if one of the events is triggered. For more
information, see the Events chapter.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 146 of 226
8.65.1 STPadCapt.ocx
Not available.
8.65.2 STPadLib.dll
The following values defined in the header file can be used for the nEvent parameter:
#define STPAD_CALLBACK_DISCONNECT 0
#define STPAD_CALLBACK_HOTSPOT 1
#define STPAD_CALLBACK_TIMEOUT 2
#define STPAD_CALLBACK_SCROLL 3
#define STPAD_CALLBACK_SIGNATURE 4
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 147 of 226
8.65.2.1 Implementation in C++
CMyClass::CMyClass()
{
STControlSetCallback(&Callback, (VOID*)this);
}
8.65.3 STPadLibNet.dll
Not available.
ControlExit method
This method releases used resources; it must be called before the component is de-initialised.
8.66.1 STPadCapt.ocx
Not available.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 148 of 226
8.66.2 STPadLib.dll
VOID STControlExit()
STControlExit();
8.66.3 STPadLibNet.dll
Not available.
RSAGenerateSigningCert/RSAGenerateSigningCertPw method
This method initiates the generation of a unique RSA key pair in the device that is used to
sign data. The keys generated are saved permanently together with a public X.509 certificate,
which is customised using the serial number of the device as well as a Certificate Signing
Request (CSR).
Please note: Generation may last several minutes depending on key length!
It is possible to permanently disable the generation of a pair of keys inside the signature
device. This function can also be protected with a password. Please refer to your contact at
signotec as required.
These methods only work with the Sigma model from firmware 1.16. With the Omega model,
they only work from firmware 1.25.
8.67.1 STPadCapt.ocx
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.0.
8.67.1.1 Implementation in C#
8.67.2 STPadLib.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.0.
8.67.3 STPadLibNet.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.2.0.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 150 of 226
8.67.3.1 Implementation in C#
try
{
stPad.RSAGenerateSigningCert(2048, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.RSAGenerateSigningCert(2048, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
RSASetSigningCert/RSASetSigningCertPw method
This method imports an X.509 certificate or a PKCS#12 container, the private key of which is
intended to be used for signing data and saves the certificate and, if necessary, the key pair
permanently in the signature device. If only the public key is transferred, the public key must
correspond to the key already generated and saved in the signature device and only the
certificate saved in the device will be overwritten. If a PKCS#12 container with a private key
and public certificate is transferred, the keys and the certificate will be overwritten in the
device, a saved Certificate Signing Request (CSR) will be deleted.
It is possible to permanently disable the storing of a key pair (generated outside the signature
device) inside the device. This function can also be protected with a password. Please refer to
your contact at signotec as required.
These methods only work with the Sigma model from firmware 1.16. With the Omega model,
they only work from firmware 1.25.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 151 of 226
BSTR bstrPassword all I Password used to fetch the private key
LPCWSTR szPassword (ignored if an X.509 certificate is transferred)
SecureString
password
ByVal password As
SecureString
BSTR max. I Password of the device (if it is password
bstrDevicePassword 32 protected); please refer to your contact at
LPCWSTR charac signotec for details
szDevicePassword ters
SecureString
devicePassword
ByVal
devicePassword As
SecureString
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.68.1 STPadCapt.ocx
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.0.
Please note: The vaCert parameter must contain a byte array or a string.
8.68.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 152 of 226
8.68.1.2 Implementation in Visual Basic
8.68.2 STPadLib.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.0.
long nResult;
nResult = STRSASetSigningCert(&btCert, sizeof(btCert), NULL);
if (nResult < 0)
AfxMessageBox(L"Error!");
8.68.3 STPadLibNet.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.2.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 153 of 226
void RSASetSigningCert(System.Security.Cryptography.X509Certificates.
X509Certificate2 cert, System.Security.SecureString password)
void RSASetSigningCert(string cert, System.Security.SecureString password)
void RSASetSigningCertPw(System.Security.Cryptography.X509Certificates.
X509Certificate2 cert, System.Security.SecureString password,
System.Security.SecureString devicePassword)
void RSASetSigningCertPw(string cert, System.Security.SecureString password,
System.Security.SecureString devicePassword)
Sub RSASetSigningCert(ByVal cert As System.Security.Cryptography.
X509Certificates.X509Certificate2, ByVal password As
System.Security.SecureString)
Sub RSASetSigningCert(ByVal cert As String, ByVal password As
System.Security.SecureString)
Sub RSASetSigningCertPw(ByVal cert As System.Security.Cryptography.
X509Certificates.X509Certificate2, ByVal password As
System.Security.SecureString, ByVal devicePassword As
System.Security.SecureString)
Sub RSASetSigningCertPw(ByVal cert As String, ByVal password As
System.Security.SecureString, ByVal devicePassword As
System.Security.SecureString)
8.68.3.1 Implementation in C#
try
{
stPad.RSASetSigningCert(new X509Certificate2(@"C:\Cert.cer"), null);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.RSASetSigningCert(@"C:\Cert.cer", null);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.RSASetSigningCert(New X509Certificate2("C:\Cert.cer"), Nothing)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 154 of 226
Work with files:
Try
STPad.RSASetSigningCert("C:\Cert.cer", Nothing)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method can be used to export the public X.509 certificate saved in the signature device
or the Certificate Signing Request (CSR), the corresponding private key of which is used for
signing data, read, or saved in a file.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
8.69.1 STPadCapt.ocx
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 155 of 226
VARIANT RSASaveSigningCertAsStream(LONG nType)
LONG STRSASaveSigningCertAsFile(LPCWSTR szPath, CERTTYPE nType)
8.69.1.1 Implementation in C#
8.69.2 STPadLib.dll
kCert_DER = 0,
kCSR_DER = 1
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 156 of 226
8.69.2.1 Implementation in C++
long nSize = 0;
long nResult = STRSASaveSigningCertAsStream(NULL, &nSize, 0);
BYTE* pbtCert = NULL;
if (nResult == 0)
{
pbtCert = new BYTE[nSize];
nResult = STRSASaveSigningCertAsStream(pbtCert, &nSize, 0);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
8.69.3 STPadLibNet.dll
Cert_DER = 0,
CSR_DER = 1
8.69.3.1 Implementation in C#
X509Certificate2 cert;
try
{
cert = (X509Certificate2)stPad.RSASaveSigningCertAsStream
(CertType.Cert_DER);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 157 of 226
Work with files:
try
{
stPad.RSASaveSigningCertAsFile(@"C:\Cert.cer", CertType.Cert_DER);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.RSASaveSigningCertAsFile("C:\Cert.cer", CertType.Cert_DER)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
RSASetHash method
This method can be used to transfer a data block (hash 1) that is to be signed in the signature
device. Subsequently, RSASign() can be called up in order to sign hash 1 directly, or
SignatureStart(), in order to transfer hash 1 to the signature device and, after capturing
the signature, to sign together with hash 2 which is generated using the biometric data.
It is possible to permanently disable the signing of a hash that was generated outside the
signature device inside the device. In this case, hash 1 can only be generated using the
RSACreateDisplayHash() method. Please refer to your contact at signotec as required.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 158 of 226
LONG nAlgorithm Algorithm that has been used to create the data block to be
HASHALGO signed and/or with which Hash 1 and Hash 2 are to be
nAlgorithm generated:
0 I SHA-1 (hash 1 must be 20 bytes long)
HashAlgo algorithm 1 I SHA-256 (hash 1 must be 32 bytes long)
ByVal algorithm As
HashAlgo
LONG nOptions Bitmask containing one or more hexadecimal values from the
HashFlag options following list:
0x01 I The data block to be signed is in little endian
ByVal options As byte order (otherwise in big endian)
HashFlag 0x02 I The given byte array does not contain a hash;
rather, it contains data with which the hash is
to be calculated
LONG nDataSize = 0 I Size of the transferred byte array; ignored if
nOptions does not contain the value 0x02; the
length is then determined using the
nAlgorithm parameter
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.70.1 STPadCapt.ocx
Available from Version 8.0.26 onwards. The described state is available as of Version 8.1.3.
Please note: The vaHash parameter must be NULL or contain a byte array.
8.70.1.1 Implementation in C#
8.70.2 STPadLib.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.0.
kSha1 = 0,
kSha256 = 1
The following values defined in the header file can be used for the nOptions parameter:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 159 of 226
#define STPAD_RSA_LITTLEENDIAN 0x01
#define STPAD_RSA_HASHDATA 0x02
8.70.3 STPadLibNet.dll
SHA1 = 0,
SHA256 = 1
None = 0x00,
LittleEndian = 0x01,
HashData = 0x01
8.70.3.1 Implementation in C#
try
{
stPad.RSASetHash(hash, HashAlgo.SHA256, HashFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.RSASign(hash, HashAlgo.SHA256, HashFlag.None)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
RSACreateDisplayHash method
This method initiates the calculation of a hash sum in the signature device using the content
of the image memory and supplies, as a byte array, the image data stream that was used to
calculate hash 1. One of the following methods should then be called: SignatureStart() to
start content signing or RSASign() to enable hash 1 to be signed in the signature device.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 160 of 226
Calling SignatureCancel() discards the previously generated hash 1. It is sometimes not
possible to access other methods.
Content signing is unique in that the screen content displayed during signing in the form of
hash 1 can be signed together with the hash based on biometric data (hash 2). Hash 2 can be
calculated retrospectively using the biometric data supplied when calling the
RSAGetSignData() method (see also RSADecryptSignData()). As a result, the screen content
is inseparably linked with the signature.
The image data stream that is returned can be converted into an image using the
RSACreateHashedImage() method. If the source memory contains content from a permanent
memory that has not been previously reserved, this data is not included in the calculation of
the hash sum! If the content of the selected source memory is empty, no image data stream
is returned.
Please note: The calculation of the hash sum may last several seconds depending on the
image data and algorithm.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25 and with the Alpha model, it only works from firmware 1.8.
8.71.1 STPadCapt.ocx
8.71.1.1 Implementation in C#
8.71.2 STPadLib.dll
kSha1 = 0,
kSha256 = 1,
kSha512 = 2
The following values defined in the header file can be used for the nTarget parameter:
#define STPAD_TARGET_FOREGROUND 0
#define STPAD_TARGET_BACKGROUND 1
#define STPAD_TARGET_DISPLAYHASH 1000
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 162 of 226
8.71.2.1 Implementation in C++
long nSize = 0;
BYTE* pbtImageData = NULL;
long nResult = STRSACreateDisplayHash(NULL, &nSize, kSha256,
STPAD_TARGET_DISPLAYHASH);
if (nResult == 0)
{
pbtImageData = new BYTE[nSize];
nResult = STRSACreateDisplayHash(pbtImageData, &nSize, kSha256,
STPAD_TARGET_DISPLAYHASH);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
8.71.3 STPadLibNet.dll
SHA1 = 0,
SHA256 = 1,
SHA512 = 2
ForegroundBuffer = 0,
BackgroundBuffer = 1,
Reserved1 = 3,
Reserved2 = 4,
Reserved3 = 5,
Reserved4 = 6,
Reserved5 = 7,
Reserved6 = 8,
Reserved7 = 9,
Reserved8 = 10,
Reserved9 = 11,
Reserved10 = 12,
Reserved11 = 13,
DisplayHashBuffer = 1000
8.71.3.1 Implementation in C#
RSACreateHashedImage method
This method generates an image from the image data stream that was returned by the
RSACreateDisplayHash() method.
8.72.1 STPadCapt.ocx
Available from Version 8.0.23.9 onwards. The status described is available from Version 8.3.1.
8.72.1.1 Implementation in C#
8.72.2 STPadLib.dll
Available from Version 8.0.23.9 onwards. The status described is available from Version 8.3.1.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 165 of 226
The FILETYPE enumeration is defined as follows:
kTiff = 0,
kPng = 1,
kBmp = 2,
kJpeg = 3,
kGif = 4
long nSize = 0;
long nResult = STRSACreateHashedImage(btImageData, sizeof(btImageData),
0, 11, NULL, &nSize, kBmp);
BYTE* pbtImage = NULL;
BITMAP bitmap;
if (nResult == 0)
{
pbtImage = new BYTE[nSize];
nResult = STRSACreateHashedImage(btImageData, sizeof(btImageData), 0,
11, pbtImage, &nSize, kBmp);
BITMAPFILEHEADER bmfh = (*(BITMAPFILEHEADER*)pbtImage);
BITMAPINFO bmi = (*(BITMAPINFO*)(pbtImage +
sizeof(BITMAPFILEHEADER)));
bitmap.bmType = 0;
bitmap.bmWidth = bmi.bmiHeader.biWidth;
bitmap.bmHeight = bmi.bmiHeader.biHeight;
bitmap.bmPlanes = bmi.bmiHeader.biPlanes;
bitmap.bmBitsPixel = bmi.bmiHeader.biBitCount;
bitmap.bmWidthBytes = ((bitmap.bmWidth * bitmap.bmBitsPixel + 31)
>> 5) << 2;
bitmap.bmBits = new BYTE[bitmap.bmHeight * bitmap.bmWidthBytes];
memcpy(bitmap.bmBits, pbtImage + bmfh.bfOffBits, bitmap.bmHeight *
bitmap.bmWidthBytes);
delete [] pbtImage;
}
if (nResult < 0)
AfxMessageBox(L"Error!");
8.72.3 STPadLibNet.dll
Available from Version 8.0.23.9 onwards. The status described is available from Version 8.3.1.
8.72.3.1 Implementation in C#
Bitmap bitmap;
try
{
bitmap = stPad.RSACreateHashedImage(imageData, Color.Black, 11);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 166 of 226
8.72.3.2 Implementation in Visual Basic
RSASign method
This method can be used to sign data in the signature device using the private key, which has
been generated using the RSAGenerateSigningCert() method or saved using the
RSASetSigningCert() method.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 167 of 226
2 I Hash 2, which has been generated using the
biometric data, is signed
LONG nOptions Bitmask containing one or more hexadecimal values from the
SignFlag options following list:
0x01 I The signature result is returned in little endian
ByVal options As byte order (otherwise in big endian)
SignFlag 0x02 I The signature result is returned as message
PKCS#7 (CMS); the value 0x01 is ignored; the
RSA scheme must be RSASSA-PKCS1-V1_5
with OID (value 1)
Return value Values Description
VARIANT empty Error
Signed data block as byte array
other
8.73.1 STPadCapt.ocx
Available from Version 8.0.26 onwards. The status described is available from Version 8.2.0.
8.73.1.1 Implementation in C#
8.73.2 STPadLib.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.2.0.
kNoHashOID = 0,
kPKCS1_V1_5 = 1,
kPSS = 2
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 168 of 226
The HASHVALUE enumeration is defined as follows:
kCombination = 0,
kHash1 = 1,
kHash2 = 2
The following values defined in the header file can be used for the nOptions parameter:
long nSize = 0;
long nResult = STRSASign(NULL, &nSize, kPSS, KCombination, 0);
BYTE* pbtSignature = NULL;
if (nResult == 0)
{
pbtSignature = new BYTE[nSize];
nResult = STRSASign(pbtSignature, &nSize, kPSS, KCombination, 0);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
8.73.3 STPadLibNet.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.2.0.
NoOID = 0,
PKCS1_V1_5 = 1,
PSS = 2
Combination = 0,
Hash1 = 1,
Hash2 = 2
None = 0,
LittleEndian = 1,
PKCS7 = 2
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 169 of 226
8.73.3.1 Implementation in C#
RSASetEncryptionCert/RSASetEncryptionCertPw method
This method imports a public X.509 certificate and permanently stores the public RSA key and
the certificate ID (‘Issuer’ and ‘Serial Number’) in the signature device. This key is used for
the encryption of biometric data (see also RSAGetSignData()).
It is possible to disable this functionality permanently inside the device. It can also be
protected with a password. Please refer to your contact at signotec as required.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
ByVal cert As
String
LONG nSize 0 I The pbtCert pointer is a WCHAR* type and
points to the certificate file path or URL.
> 0 I Size of transferred byte array
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 170 of 226
BSTR max. I Password of the device (if it is password
bstrDevicePassword 32 protected); please refer to your contact at
LPCWSTR charac signotec for details
szDevicePassword ters
SecureString
devicePassword
ByVal
devicePassword As
SecureString
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.74.1 STPadCapt.ocx
Available from Version 8.0.26 onwards. The status described is available from Version 8.2.0.
Please note: The vaCert parameter must contain a byte array or a string.
8.74.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 171 of 226
8.74.2 STPadLib.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.2.0.
8.74.3 STPadLibNet.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.2.
void RSASetEncryptionCert
(System.Security.Cryptography.X509Certificates.X509Certificate2 cert)
void RSASetEncryptionCert(string cert)
void RSASetEncryptionCert()
void RSASetEncryptionCertPw
(System.Security.Cryptography.X509Certificates.X509Certificate2 cert,
System.Security.SecureString devicePassword)
void RSASetEncryptionCertPw(string cert, System.Security.SecureString
devicePassword)
void RSASetEncryptionCertPw(System.Security.SecureString devicePassword)
Sub RSASetEncryptionCert(ByVal cert As
System.Security.Cryptography.X509Certificates.X509Certificate2)
Sub RSASetEncryptionCert(ByVal cert As System.Security.SecureString)
Sub RSASetEncryptionCert()
Sub RSASetEncryptionCertPw(ByVal cert As
System.Security.Cryptography.X509Certificates.X509Certificate2, ByVal
devicePassword As System.Security.SecureString)
Sub RSASetEncryptionCertPw(ByVal cert As String, ByVal devicePassword As
System.Security.SecureString)
Sub RSASetEncryptionCertPw(ByVal devicePassword As
System.Security.SecureString)
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 172 of 226
8.74.3.1 Implementation in C#
try
{
stPad.RSASetEncryptionCert(new X509Certificate2(@"C:\Cert.cer"));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.RSASetEncryptionCert(@"C:\Cert.cer");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.RSASetEncryptionCert(New X509Certificate2("C:\Cert.cer"))
Catch ex As STPadException
MsgBox(ex.Message)
End Try
Try
STPad.RSASetEncryptionCert("C:\Cert.cer")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
RSAGetEncryptionCertId method
This method exports the ID of the public key that is stored in the signature device and used
for the encryption of biometric data. The ID is a character string consisting of the ‘Issuer’ and
‘Serial Number’ of the certificate in hexadecimal representation that has been transferred
when saving the key, e.g., ‘Example certificate (ff 0a)’
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
8.75.1 STPadCapt.ocx
BSTR RSAGetEncryptionCertId()
8.75.1.1 Implementation in C#
8.75.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 174 of 226
8.75.2.1 Implementation in C++
long nLen = 0;
long nResult = STRSAGetEncryptionCertId(NULL, &nLen);
if (nResult > 0)
{
WCHAR* szId = new WCHAR[nLen / sizeof(WCHAR)];
nResult = STRSAGetEncryptionCertId(szId, &nLen);
if (nResult > 0)
{
WCHAR* szText = new WCHAR[nLen / sizeof(WCHAR) + 64];
swprintf_s(szText, nLen / sizeof(WCHAR) + 64, L" The cert ID is:
%s", szId);
AfxMessageBox(szText);
delete [] szText;
}
delete [] szId;
}
if (nResult < 0)
AfxMessageBox(L"Error!");
8.75.3 STPadLibNet.dll
string RSAGetEncryptionCertId()
Function RSAGetEncryptionCertId() As String
8.75.3.1 Implementation in C#
try
{
string strId = stPad.RSAGetEncryptionCertId();
MessageBox.Show(String.Format("The cert ID is: {0}", strId));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim strId As String = STPad.RSAGetEncryptionCertId()
MsgBox("The cert ID is: " & strId)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
RSAGetSignData method
This method returns the digitalised signature in RSA encrypted SignData format. Encryption is
carried out in the signature device using the key that has been saved in the device using the
RSASetEncryptionCert()method.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 175 of 226
method. In order to access data directly in conventional SignData format, please use the
SignatureGetSignData() method.
The data is returned in compressed format by default and consequently hash 2 can only be
calculated using of the biometric data using the RSADecryptSignData() method for which the
appropriate private RSA key is required. In order to be able to calculate hash 2 without a
private RSA key, data can also be returned in uncompressed format; please note the sample
code in this respect.
This method discards a hash 1 that was calculated with the RSACreateDisplayHash() method
and ends content signing. The signing of data using the RSASign() method must therefore
take place beforehand.
With the Sigma model this method only works from firmware 1.16. With the Omega model, it
only works from firmware 1.25.
8.76.1 STPadCapt.ocx
8.76.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 176 of 226
Exporting uncompressed SignData and extraction of data from which hash 2 has been
calculated:
Exporting uncompressed SignData and extraction of data from which hash 2 has been
calculated:
8.76.2 STPadLib.dll
The following values defined in the header file can be used for the nOptions parameter:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 177 of 226
8.76.2.1 Implementation in C++
long nSize = 0;
long nResult;
nResult = STRSAGetSignData(NULL, &nSize, 0);
BYTE* pbtSignData = NULL;
if (nResult == 0)
{
pbtSignData = new BYTE[nSize];
nResult = STRSAGetSignData(pbtSignData, &nSize,
STPAD_GETSIGNDATA_UNCOMPRESSED);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
Exporting uncompressed SignData and extraction of data from which hash 2 has been
calculated:
long nSize = 0;
long nResult;
nResult = STRSAGetSignData(NULL, &nSize, STPAD_GETSIGNDATA_UNCOMPRESSED);
BYTE* pbtSignData = NULL;
if (nResult == 0)
{
pbtSignData = new BYTE[nSize];
nResult = STRSAGetSignData(pbtSignData, &nSize,
STPAD_GETSIGNDATA_UNCOMPRESSED);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
int nOffset = *((short*)(&btSignData[28])) + 32;
nOffset += *((int*)(&btSignData[nOffset]));
BYTE* pbtHash2Data = new BYTE[nSize - nOffset];
memcpy(pbtHashData, &btSignData[nOffset], nSize – nOffset);
8.76.3 STPadLibNet.dll
None = 0,
Uncompressed = 1
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 178 of 226
8.76.3.1 Implementation in C#
byte[] btSignData;
try
{
btSignData = stPad.RSAGetSignData(SignDataGetFlag.None);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Exporting uncompressed SignData and extraction of data from which hash 2 has been
calculated:
byte[] btSignData;
try
{
btSignData = stPad.RSAGetSignData(SignDataGetFlag.Uncompressed);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
int nOffset = BitConverter.ToInt16(btSignData, 28) + 32;
nOffset += BitConverter.ToInt32(btSignData, nOffset);
byte[] btHash2Data = new byte[btSignData.Length - nOffset];
Array.Copy(btSignData, nOffset, btHash2Data, 0, btHash2Data.Length);
Exporting uncompressed SignData and extraction of data from which hash 2 has been
calculated:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 179 of 226
RSADecryptSignData method
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 180 of 226
LONG* pnExtraData Bitmask, which contains one or more hexadecimal values from
SignDataDecryptFla the following list and which
g extraData (if transferred in the first SignData parameter) defines which
of the RSA encrypted SignData should also be decrypted in
ByVal extraData As order to retrieve it when this method is called at a later point
SignDataDecryptFla
(if NULL is transferred in the first parameter) defines which of
g
the previously temporarily stored data should be returned in
this call and deleted internally
(on method return) indicates which additional data has been
temporarily stored and which has not yet been collected
0x01 I/O Time stamp of the signature in seconds since
1 January 1970 in UTC (8 bytes, little endian,
no prefix)
0x02 I/O Serial number of the signature device with
which the data has been captured (4 bytes,
little endian, no prefix)
0x04 I/O Origin of the key used for signing (4 bytes,
little endian, no prefix):
0=key generated in the device
1=externally generated key loaded in the
device
2=key saved as default setting
0x08 I/O Firmware version of the signature device with
which the data has been captured (2 x 4 bytes,
little endian, no prefix); the first 4 bytes
contain the ‘Major’ version, the second the
‘Minor’ version
0x10 I/O Hash 1, which has been specified
byRSASetHash() at the start of the signature
process, in big endian byte order (variable
length)
0x20 I/O Hash 2 of the biometric data in big endian byte
order (variable length); this hash is not
contained directly in the SignData but is
calculated from the data
Return value Values Description
VARIANT empty Error
other Decrypted SignData or exported extra data as byte
array
LONG 0 Method was executed successfully
< 0 Error
byte[] != Decrypted SignData or exported extra data
NULL
Byte()
8.77.1 STPadCapt.ocx
Please note: The vaEncrypted parameter must contain a byte array and the vaCert
parameter must contain a byte array or a string.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 181 of 226
8.77.1.1 Implementation in C#
Subsequently, the time stamp and serial number, for example, can be called as follows:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 182 of 226
Work with files:
Subsequently, the time stamp and serial number, for example, can be called as follows:
8.77.2 STPadLib.dll
The following values defined in the header file can be used for the pnExtraData parameter:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 183 of 226
8.77.2.1 Implementation in C++
long nSize = 0;
int nExtraData = STPAD_DECRYPTSIGNDATA_ALL;
long nResult = STRSADecryptSignData(&btEncrypted, sizeof(btEncrypted),
NULL, &nSize, &btCert, sizeof(btCert),
L"password", &nExtraData);
BYTE* pbtSignData = NULL;
if (nResult == 0)
{
pbtSignData = new BYTE[nSize];
nResult = STRSADecryptSignData(&btEncrypted, sizeof(btEncrypted),
pbtSignData, &nSize, &btCert, sizeof(btCert),
L"password", &nExtraData);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
long nSize = 0;
int nExtraData = STPAD_DECRYPTSIGNDATA_ALL;
long nResult = STRSADecryptSignData(&btEncrypted, sizeof(btEncrypted),
NULL, &nSize, (BYTE*)L"C:\\Cert.pfx", 0,
L"password", &nExtraData);
BYTE* pbtSignData = NULL;
if (nResult == 0)
{
pbtSignData = new BYTE[nSize];
nResult = STRSADecryptSignData(&btEncrypted, sizeof(btEncrypted),
pbtSignData, &nSize, (BYTE*)L"C:\\Cert.pfx",
0, L"password", &nExtraData);
}
if (nResult < 0)
AfxMessageBox(L"Error!");
Subsequently, the time stamp and serial number, for example, can be called as follows:
BYTE btTimestamp[8];
if (nExtraData & STPAD_DECRYPTSIGNDATA_TIMESTAMP)
{
nSize = sizeof(btTimestamp);
nExtraData = STPAD_DECRYPTSIGNDATA_TIMESTAMP;
nResult = STRSADecryptSignData(NULL, 0, btTimestamp, &nSize, NULL, 0,
NULL, &nExtraData);
}
BYTE btSerial[4];
if (nExtraData & STPAD_DECRYPTSIGNDATA_SERIAL)
{
nSize = sizeof(btSerial);
nExtraData = STPAD_DECRYPTSIGNDATA_SERIAL;
nResult = STRSADecryptSignData(NULL, 0, btSerial, &nSize, NULL, 0,
NULL, &nExtraData);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 184 of 226
8.77.3 STPadLibNet.dll
Available from Version 8.0.26 onwards. The status described is available from Version 8.4.2.
None = 0,
Timestamp = 0x01,
Serial = 0x02,
KeySource = 0x04,
Firmware = 0x08,
Hash1 = 0x10,
Hash2 = 0x20,
All = 0x3f
8.77.3.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 185 of 226
Work with files:
Subsequently, the time stamp and serial number, for example, can be called as follows:
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 186 of 226
Work with files:
Subsequently, the time stamp and serial number, for example, can be called as follows:
PDFLoad method
This method can be used to load a PDF document in order to subsequently display it on the
signature device using the DisplaySetPDF() method.
STPdfLib13.dll must be in the application’s search path or next to STPadCapt.ocx (if used) in
order to use this method.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 187 of 226
BSTR bstrPassword all I Password of the PDF document (optional)
LPCWSTR szPassword
SecureString
password
ByVal password As
SecureString
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.78.1 STPadCapt.ocx
8.78.1.1 Implementation in C#
8.78.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 188 of 226
8.78.2.1 Implementation in C++
8.78.3 STPadLibNet.dll
Available from Version 8.1.4 onwards. The status described is available from Version 8.4.2.
void PDFLoad()
void PDFLoad(byte[] document)
void PDFLoad(string document)
void PDFLoad(byte[] document, System.Security.SecureString password)
void PDFLoad(string document, System.Security.SecureString password)
Sub PDFLoad()
Sub PDFLoad(ByVal document As Byte())
Sub PDFLoad(ByVal document As String)
Sub PDFLoad(ByVal document As Byte(), ByVal password As
System.Security.SecureString)
Sub PDFLoad(ByVal document As String, ByVal password As
System.Security.SecureString)
8.78.3.1 Implementation in C#
try
{
stPad.PDFLoad(pdf, null);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
try
{
stPad.PDFLoad(@"C:\Doc.pdf", null);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 189 of 226
8.78.3.2 Implementation in Visual Basic
Try
STPad.PDFLoad(pdf, Nothing)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
Try
STPad.PDFLoad("C:\Doc.pdf", Nothing)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
PDFGetPageCount method
This method delivers the number of pages of the currently loaded PDF document.
Integer
8.79.1 STPadCapt.ocx
LONG PDFGetPageCount()
8.79.1.1 Implementation in C#
8.79.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 190 of 226
LONG STPDFGetPageCount()
8.79.3 STPadLibNet.dll
int PDFGetPageCount()
Function PDFGetPageCount() As Integer
8.79.3.1 Implementation in C#
try
{
int nCount = stPad.PDFGetPageCount();
MessageBox.Show(String.Format("The document has {0} pages.",nCount));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim nCount As Integer = STPad.PDFGetPageCount()
MsgBox(The document has " & CStr(nCount) & " pages.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
PDFGetWidth method
This method returns the width of a page of the currently loaded PDF document.
ByVal page As
Integer
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 191 of 226
LONG nUnit 0 I Pixels are used as the unit of measurement
MEASUREMENTUNIT (based on the display of the signature device
nUnit used)
1 I Millimetres are used as the unit of
MeasurementUnit
measurement
unit 2 I Inches are used as the unit of measurement
ByVal unit As
MeasurementUnit
Return value Values Description
DOUBLE >= 0 Page width
double < 0 Error (not STPadLibNet.dll)
Double
8.80.1 STPadCapt.ocx
8.80.1.1 Implementation in C#
8.80.2 STPadLib.dll
kPixels = 0,
kMillimetres = 1,
kInches = 2
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 192 of 226
8.80.2.1 Implementation in C++
8.80.3 STPadLibNet.dll
Pixels = 0,
Millimetres = 1,
Inches = 2
8.80.3.1 Implementation in C#
try
{
double dWidth = stPad.PDFGetWidth(1, MeasurementUnit.Millimetres);
MessageBox.Show(String.Format("The page has a width of {0}
millimetres.", dWidth);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim dWidth As Double
Double = STPad.PDFGetWidth(1, MeasurementUnit.Millimetres)
MsgBox("The page has a width of " & CStr(dWidth) & " millimetres.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
PDFGetHeight method
This method returns the height of a page of the currently loaded PDF document.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 193 of 226
Parameter Values I/O Description
LONG nPage > 0 I Number of the page whose height is to be
int page returned (starting at 1)
ByVal page As
Integer
LONG nUnit 0 I Pixels are used as the unit of measurement
MEASUREMENTUNIT (based on the display of the signature device
nUnit used)
1 I Millimetres are used as the unit of
MeasurementUnit
measurement
unit 2 I Inches are used as the unit of measurement
ByVal unit As
MeasurementUnit
Return value Values Description
DOUBLE >= 0 Page height
double < 0 Error (not STPadLibNet.dll)
Double
8.81.1 STPadCapt.ocx
8.81.1.1 Implementation in C#
8.81.2 STPadLib.dll
kPixels = 0,
kMillimetres = 1,
kInches = 2
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 194 of 226
8.81.2.1 Implementation in C++
8.81.3 STPadLibNet.dll
Pixels = 0,
Millimetres = 1,
Inches = 2
8.81.3.1 Implementation in C#
try
{
double dHeight = stPad.PDFGetHeight(1, MeasurementUnit.Millimetres);
MessageBox.Show(String.Format("The page has a height of {0}
millimetres.", dHeight);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
Dim dHeight As Double
Double = STPad.PDFGetHeight(1, MeasurementUnit.Millimetres)
MsgBox("The page has a height of " & CStr(dHeight) & " millimetres.")
Catch ex As STPadException
MsgBox(ex.Message)
End Try
PDFSelectRect method
This method can be used to specify an excerpt of a page of the currently loaded PDF
document, which can then be displayed on the signature device with the DisplaySetPDF()
method. The full page is always displayed by default.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 195 of 226
Parameter Values I/O Description
LONG nPage all I Number of the page to be output (starting at 1)
int page
ByVal page As
Integer
DOUBLE dLeft >= 0 I Left border of the excerpt on the PDF page
double left
ByVal left As
Double
DOUBLE dTop >= 0 I Upper border of the excerpt on the PDF page
double top
ByVal top As
Double
DOUBLE dWidth >= 0 I Width of the excerpt (the excerpt may not be
double width outside of the page, the page width can be
determined using PDFGetWidth())
ByVal width As
Double
DOUBLE dHeight >= 0 I Height of the excerpt (the excerpt may not be
double height outside of the page, the page height can be
determined using PDFGetHeight())
ByVal height As
Double
LONG nUnit 0 I Pixels are used as the unit of measurement
MEASUREMENTUNIT (based on the display of the signature device
nUnit used)
1 I Millimetres are used as the unit of
MeasurementUnit
measurement
unit
2 I Inches are used as the unit of measurement
ByVal unit As
MeasurementUnit
Return value Values Description
LONG 0 Method was executed successfully
< 0 Error
8.82.1 STPadCapt.ocx
LONG PDFSelectRect(LONG nPage, DOUBLE dLeft, DOUBLE dTop, DOUBLE dWidth, DOUBLE
dHeight, LONG nUnit)
8.82.1.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 196 of 226
8.82.1.2 Implementation in Visual Basic
8.82.2 STPadLib.dll
kPixels = 0,
kMillimetres = 1,
kInches = 2
8.82.3 STPadLibNet.dll
void PDFSelectRect(int page, double left, double top, double width, double
height, MeasurementUnit unit)
Sub PDFSelectRect(ByVal page As Integer, ByVal left As Double, ByVal top As
Double, ByVal width As Double, ByVal height As Double, ByVal unit As
MeasurementUnit)
Pixels = 0,
Millimetres = 1,
Inches = 2
8.82.3.1 Implementation in C#
try
{
stPad.PDFSelectRect(1, 0.0, 0.0, 640.0, 480.0,
MeasurementUnit.Pixels);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 197 of 226
8.82.3.2 Implementation in Visual Basic
Try
STPad.PDFSelectRect(1, 0R, 0R,640R, 480R, MeasurementUnit.Pixels)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
This method can be used to add an image to a page of the currently loaded PDF document.
The added image(s) is/are then rendered on the page image the next time the
DisplaySetPDF() method is called. This can be used to highlight areas of the document on
the signature device, for example.
Integer
8.83.1 STPadCapt.ocx
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 198 of 226
8.83.1.1 Implementation in C#
8.83.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 199 of 226
Work with files:
8.83.3 STPadLibNet.dll
8.83.3.1 Implementation in C#
int nId;
try
{
Bitmap bitmap = (Bitmap)Bitmap.FromFile(@"C:\Image.png");
nId = stPad.PDFAddImage(1, 0, 0, bitmap);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
int nId;
try
{
nId = stPad.PDFAddImageFromFile(1, 0, 0, @"C:\Image.png");
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 200 of 226
Work with files:
PDFRemoveImage method
This method can be used to remove an image that has been added to a page using
PDFAddImage() or PDFAddImageFromFile(). The removed image is no longer rendered on the
page image the next time the DisplaySetPDF() method is called.
8.84.1 STPadCapt.ocx
8.84.1.1 Implementation in C#
8.84.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 201 of 226
8.84.2.1 Implementation in C++
8.84.3 STPadLibNet.dll
8.84.3.1 Implementation in C#
try
{
stPad.PDFRemoveImage(1, 0);
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
STPad.PDFAddImage(1, 0)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 202 of 226
9 Properties
The STPadLib.dll component has no properties. Get() and Set() methods are used instead.
These methods all begin with ‘ST,’ for example, „STDeviceGetLedDefaultFlag()“.
Some programming languages, such as C++, for example, do not support COM properties and
use wrapper methods instead. In Visual C++, properties are wrapped as ‘GetProperty()’ and
‘SetProperty(),’ for example.
DeviceLedDefaultFlag property
This property specifies whether the LED on the front of the pad automatically changes to
green when the device is in signature capture mode. The default setting is TRUE. The LED
always lights up yellow as soon as the device has been detected by the PC operating system
and is ready for use.
9.1.1 STPadCapt.ocx
VARIANT_BOOL DeviceLedDefaultFlag
9.1.1.1 Implementation in C#
axSTPadCapt1.DeviceLedDefaultFlag = false;
AxSTPadCapt1.DeviceLedDefaultFlag = False
9.1.2 STPadLib.dll
BOOL STDeviceGetLedDefaultFlag()
VOID STDeviceSetLedDefaultFlag(BOOL bFlag)
STDeviceSetLedDefaultFlag(FALSE);
9.1.3 STPadLibNet.dll
9.1.3.1 Implementation in C#
stPad.DeviceLedDefaultFlag = false;
STPad.DeviceLedDefaultFlag = False
ControlVersion property
9.2.1 STPadCapt.ocx
BSTR ControlVersion
9.2.1.1 Implementation in C#
MessageBox.Show(String.Format("Version: {0}",
axSTPadCapt1.ControlVersion));
9.2.2 STPadLib.dll
WCHAR szVersion[16];
LONG nRc = STControlGetVersion(szVersion);
if (nRc < 0)
wprintf(L"Error %d", nRc);
else
wprintf(L"Version: %s", szVersion);
9.2.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 204 of 226
9.2.3.1 Implementation in C#
try
{
MessageBox.Show(String.Format("Version: {0}", stPad.ControlVersion));
}
catch (STPadException ex)
{
MessageBox.Show(ex.Message);
}
Try
MsgBox("Version: " & STPad.ControlVersion)
Catch ex As STPadException
MsgBox(ex.Message)
End Try
ControlAppName property
This property can contain the name of the application that uses the component. Users can use
this name to exclusively assign one or more image memories. Please refer to chapter
‘Exclusive use of non-volatile memory’ for details.
9.3.1 STPadCapt.ocx
BSTR ControlAppName
9.3.1.1 Implementation in C#
9.3.2 STPadLib.dll
9.3.3 STPadLibNet.dll
9.3.3.1 Implementation in C#
ControlBackColor property
This property specifies the colour in which the control element’s window is displayed. The
default setting is white.
9.4.1 STPadCapt.ocx
OLE_COLOR ControlBackColor
9.4.1.1 Implementation in C#
9.4.2 STPadLib.dll
Not available.
9.4.3 STPadLibNet.dll
9.4.3.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 206 of 226
ControlRectColor property
This property specifies the colour of the one-pixel-wide border within the control element’s
window. No border is drawn if this value is identical to the value of the ControlBackColor
property. The default setting is orange.
9.5.1 STPadCapt.ocx
OLE_COLOR ControlRectColor
9.5.1.1 Implementation in C#
9.5.2 STPadLib.dll
Not available.
9.5.3 STPadLibNet.dll
9.5.3.1 Implementation in C#
ControlPenColor property
This property specifies the colour in which the captured signature is rendered in the control
element’s window. The default setting is blue.
9.6.1 STPadCapt.ocx
OLE_COLOR ControlPenColor
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 207 of 226
9.6.1.1 Implementation in C#
9.6.2 STPadLib.dll
Not available.
9.6.3 STPadLibNet.dll
9.6.3.1 Implementation in C#
ControlPenWidth property
This property specifies the pen width with which the captured signature is rendered in the
control element’s window. The default setting is 0 (variable).
9.7.1 STPadCapt.ocx
SHORT ControlPenWidth
9.7.1.1 Implementation in C#
axSTPadCapt1.ControlPenWidth = 0;
AxSTPadCapt1.ControlPenColor = 0
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 208 of 226
9.7.2 STPadLib.dll
Not available.
9.7.3 STPadLibNet.dll
9.7.3.1 Implementation in C#
stPad.ControlPenWidth = 0;
STPad.ControlPenWidth = 0
ControlMirrorDisplay property
This property specifies whether the content of the LCD should also be displayed in the control
element’s window. The drawing is always centred in the control. The default setting is 1.
9.8.1 STPadCapt.ocx
Available from Version 8.0.3 onwards. The status described is available from Version 8.0.29.
SHORT ControlMirrorDisplay
9.8.1.1 Implementation in C#
axSTPadCapt1.ControlMirrorDisplay = 2;
AxSTPadCapt1.ControlMirrorDisplay = 2
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 209 of 226
9.8.2 STPadLib.dll
Not available.
9.8.3 STPadLibNet.dll
Available from Version 8.0.21 onwards (only in the STPadLibControl class). The status
described is available from Version 8.0.29.
Nothing = 0,
Signature = 1,
Everything = 2,
SignRect = 3,
EverythingActiveHotSpots = 4
9.8.3.1 Implementation in C#
stPad.ControlMirrorDisplay = MirrorMode.Everything;
STPad.ControlMirrorDisplay = MirrorMode.Everything
DisplayWidth property
This property holds the width of the LCD It can only be queried after a device has been
opened.
9.9.1 STPadCapt.ocx
LONG DisplayWidth
9.9.1.1 Implementation in C#
9.9.2 STPadLib.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 210 of 226
LONG STDisplayGetWidth()
9.9.3 STPadLibNet.dll
9.9.3.1 Implementation in C#
DisplayHeight property
This property holds the height of the LCD It can only be queried after a device has been
opened.
9.10.1 STPadCapt.ocx
LONG DisplayHeight
9.10.1.1 Implementation in C#
9.10.2 STPadLib.dll
LONG STDisplayGetHeight()
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 211 of 226
9.10.3 STPadLibNet.dll
9.10.3.1 Implementation in C#
DisplayResolution property
This property contains the resolution of the LCD. It can only be queried after a device has
been opened.
9.11.1 STPadCapt.ocx
DOUBLE DisplayResolution
9.11.1.1 Implementation in C#
9.11.2 STPadLib.dll
DOUBLE STDisplayGetResolution()
9.11.3 STPadLibNet.dll
DisplayTargetWidth property
This property holds the width of the memory defined with the DisplaySetTarget() method.
It can only be queried after a device has been opened.
9.12.1 STPadCapt.ocx
LONG DisplayTargetWidth
9.12.1.1 Implementation in C#
9.12.2 STPadLib.dll
LONG STDisplayGetTargetWidth()
9.12.3 STPadLibNet.dll
9.12.3.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 213 of 226
9.12.3.2 Implementation in Visual Basic
DisplayTargetHeight property
This property holds the height of the memory defined with the DisplaySetTarget() method.
It can only be queried after a device has been opened.
9.13.1 STPadCapt.ocx
LONG DisplayTargetHeight
9.13.1.1 Implementation in C#
9.13.2 STPadLib.dll
LONG STDisplayGetTargetHeight()
9.13.3 STPadLibNet.dll
9.13.3.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 214 of 226
DisplayScrollSpeed property
This property determines the speed at which the screen content is scrolled when a hotspot
generated by STSensorAddScrollHotSpot() is triggered. The default setting is 100.
9.14.1 STPadCapt.ocx
LONG DisplayScrollSpeed
9.14.1.1 Implementation in C#
axSTPadCapt1.DisplayScrollSpeed = 100;
AxSTPadCapt1.DisplayScrollSpeed = 100
9.14.2 STPadLib.dll
LONG STDisplayGetScrollSpeed()
LONG STDisplaySetScrollSpeed(LONG nSpeed)
The STDisplaySetScrollSpeed() method returns the value that has actually been set.
STDisplaySetScrollSpeed(100);
9.14.3 STPadLibNet.dll
9.14.3.1 Implementation in C#
stPad.DisplayScrollSpeed = 100;
STPad.DisplayScrollSpeed = 100
DisplayRotation property
This property defines the rotation with which the image data is transferred to the signature
device and the sensor areas are defined. A change to the value only affects images and
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 215 of 226
sensor areas which are transferred after the change is made and not images which are copied
from one pad memory to another. The default setting is 0.
9.15.1 STPadCapt.ocx
LONG DisplayRotation
9.15.1.1 Implementation in C#
axSTPadCapt1.DisplayRotation = 180;
AxSTPadCapt1.DisplayRotation = 180
9.15.2 STPadLib.dll
LONG STDisplayGetRotation()
LONG STDisplaySetRotation(LONG nRotation)
STDisplaySetRotation(180);
9.15.3 STPadLibNet.dll
9.15.3.1 Implementation in C#
stPad.DisplayRotation = 180;
STPad.DisplayRotation = 180
SignatureState property
This property holds the current state of the signature capture process.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 216 of 226
9.16.1 STPadCapt.ocx
VARIANT_BOOL SignatureState
9.16.1.1 Implementation in C#
if (!axSTPadCapt1.SignatureState)
axSTPadCapt1.SignatureStart();
else
axSTPadCapt1.SignatureConfirm();
9.16.2 STPadLib.dll
BOOL STSignatureGetState()
if (!STSignatureGetState())
STSignatureStart();
else
STSignatureConfirm();
9.16.3 STPadLibNet.dll
9.16.3.1 Implementation in C#
if (!stPad.SignatureState)
stPad.SignatureStart();
else
stPad.SignatureConfirm();
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 217 of 226
SignatureSignData property
This method is obsolete and is only included for compatibility reasons. Please use the
SignatureGetSignData() method instead.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 218 of 226
10 Events
The STPadLib.dll component uses a callback mechanism to pass events through to the
application. For more information, see the STControlSetCallback() method.
The events are implemented as delegates in the STPadLibNet.dll component. They run in the
thread of the DLL, which is why UI elements of the application cannot be addressed directly. A
further delegate must be addressed using Invoke() instead. Please also see the demo
application included.
DeviceDisconnected event
This event is called as soon as a device is disconnected through an external event (e. g.
unplugging the device).
10.1.1 STPadCapt.ocx
10.1.1.1 Implementation in C#
10.1.2 STPadLib.dll
10.1.3 STPadLibNet.dll
10.1.3.1 Implementation in C#
SignatureDataReceived event
This event is called when signature data is received from the pad.
10.2.1 STPadCapt.ocx
10.2.1.1 Implementation in C#
10.2.2 STPadLib.dll
10.2.3 STPadLibNet.dll
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 221 of 226
void raise_SignatureDataReceived(object sender, signotec.STPadLibNet.
SignatureDataReceivedEventArgs e)
Event SignatureDataReceived(ByVal sender As Object, ByVal e As
signotec.STPadLibNet.SignatureDataReceivedEventArgs)
10.2.3.1 Implementation in C#
SensorHotSpotPressed event
This event is called as soon as the user lifts the pen off a rectangle defined with
SensorAddHotSpot().
10.3.1 STPadCapt.ocx
Available from Version 8.0.1 onwards. The status described is available from Version 8.3.1.
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 222 of 226
10.3.1.1 Implementation in C#
10.3.2 STPadLib.dll
10.3.3 STPadLibNet.dll
10.3.3.1 Implementation in C#
SensorTimeoutOccured event
This event is called as soon as the timer started with SensorStartTimer() has expired.
10.4.1 STPadCapt.ocx
10.4.1.1 Implementation in C#
10.4.2 STPadLib.dll
10.4.3 STPadLibNet.dll
10.4.3.1 Implementation in C#
DisplayScrollPosChanged event
This event is called as soon as the scroll position of the display contents has changed.
xPos As Integer
LONG nYPos >= 0 Vertical offset of the display contents to the top, in
int yPos pixels
yPos As Integer
Return value Values Description
- - -
10.5.1 STPadCapt.ocx
10.5.1.1 Implementation in C#
10.5.2 STPadLib.dll
10.5.3 STPadLibNet.dll
10.5.3.1 Implementation in C#
© 2000 – 2019 signotec GmbH signoPAD API Documentation Page 226 of 226