SignAPI

AddSignatureField
CalibrateSensor
CheckConnectedDevice
ClearLcd
ConvertImageToSoi
ConvertSoiToImage
CopyFileFromDevice
CopyFileToDevice
DecryptAesKeyWithPemPath
DecryptBioText32
DeleteFile
DeleteFileWithName
DeletePromoScreen
DeviceSearch
DialogAddCustomButton
DialogAddKeyboard
DialogCreate
DialogDeleteCustomButton
DialogDeleteKeyboard
DialogDisableFormFields
DialogGetAvailableDefaultKeyboards
DialogGetBottomMargin
DialogGetCheckBoxColor
DialogGetDefaultCapsKeyboard
DialogGetDefaultKeyboard
DialogGetDefaultSymbolsAndNumbersKeyboard
DialogGetDefaultTextCapture
DialogGetEnableSaveButton
DialogGetEnableStartSignButton
DialogGetLeftMargin
DialogGetRadioButtonColor
DialogGetRightMargin
DialogGetScrollButtonBackgroundColor
DialogGetScrollButtonBackgroundPressedColor
DialogGetScrollButtonIconColor
DialogGetScrollValue
DialogGetSignatureFieldColor
DialogGetTextFieldColor
DialogGetTopMargin
DialogMessageBox
DialogSave
DialogSetBottomMargin
DialogSetCallback
DialogSetCheckBoxColor
DialogSetDefaultCapsKeyboard
DialogSetDefaultKeyboard
DialogSetDefaultSymbolsAndNumbersKeyboard
DialogSetDefaultTextCapture
DialogSetEnableSaveButton
DialogSetEnableStartSignButton
DialogSetLeftMargin
DialogSetRadioButtonColor
DialogSetRightMargin
DialogSetScrollButtonBackgroundColor
DialogSetScrollButtonBackgroundPressedColor
DialogSetScrollButtonIconColor
DialogSetScrollValue
DialogSetSignatureFieldColor
DialogSetTextFieldColor
DialogSetTopMargin
DownloadPdf
DrawImage
Echo
EnumerateDevices
EnumerateDevicesFilter
ExtractText
FindText
Free
FreeAll
GetAcroFormFields
GetBehaviourDefault
GetBioData
GetButtonConfigColor
GetButtonConfigEnabled
GetButtonConfigKind
GetButtonConfigs
GetButtonConfigsInMode
GetButtonConfigVisible
GetCheckBoxIsChecked
GetChoiceFieldChoices
GetChoiceFieldDisplayValues
GetChoiceFieldDoNotSpellCheck
GetChoiceFieldIsCommitOnSetChange
GetChoiceFieldIsMultiSelect
GetChoiceFieldIsSort
GetChoiceFieldSelection
GetChoiceFieldTextAppearance
GetCryptoIdDescription
GetCryptoIdPadCertLength
GetCryptoIdPadNotaryLength
GetDefaultTextBuilderOf
GetDeviceCryptoIdInfo
GetDeviceCryptoIds
GetDeviceDisplayHeight
GetDeviceDisplayHeightInMillimeters
GetDeviceDisplayHeightSansButtonBar
GetDeviceDisplaySize
GetDeviceDisplaySizeSansBar
GetDeviceDisplayWidth
GetDeviceDisplayWidthInMillimeters
GetDeviceDisplayWidthSansButtonBar
GetDeviceFeatures
GetDeviceFirmwareVersion
GetDeviceFreeRamSize
GetDevicePadOpenState
GetDevicePixelSize
GetDeviceProductId
GetDeviceProductName
GetDeviceSerialNumber
GetDeviceState
GetDeviceTouchHeight
GetDeviceTouchWidth
GetDeviceTransPortProtocol
GetDeviceVendorId
GetDeviceVendorName
GetDocSignRectangleFromBottomLeftAndWidthHeight
GetDocSignRectangleFromBottomLeftAndZoomLevel
GetDocSignRectangleFromBottomRightAndWidthHeight
GetDocSignRectangleFromBottomRightAndZoomLevel
GetDocSignRectangleFromTopLeftAndWidthHeight
GetDocSignRectangleFromTopLeftAndZoomLevel
GetDocSignRectangleFromTopRightAndWidthHeight
GetDocSignRectangleFromTopRightAndZoomLevel
GetDriverXmlCertificate
GetEncryptedAesKey
GetFieldIsButtonField
GetFieldIsCheckBox
GetFieldIsChoiceField
GetFieldIsComboBox
GetFieldIsListBox
GetFieldIsPushButton
GetFieldIsRadioButton
GetFieldIsReadOnly
GetFieldIsSignatureField
GetFieldIsTextField
GetFieldName
GetFieldPosition
GetFieldType
GetFileInfoName
GetFileInfos
GetFileInfoSize
GetHello
GetLastSigError
GetNumberOfPages
GetPageDimensions
GetPdfFromSignedXml
GetPrintArgsDefault
GetRadioButtonChoices
GetRadioButtonIsOff
GetRadioButtonPositions
GetRadioButtonSelection
GetRectangleFromBottomLeft
GetRectangleFromBottomRight
GetRectangleFromTopLeft
GetRectangleFromTopRight
GetRectangleStandard
GetSignatureCertificate
GetSignatureContentDigest
GetSignatureFieldContentDigest
GetSignatureFieldSignature
GetSignatureFieldSignatureInfo
GetSignatureImageAlignment
GetSignatureImageAsHBitmap
GetSignatureImageAsPng
GetSignatureImageBackgroundColor
GetSignatureImageLineColor
GetSignatureImageLineWidth
GetSignatureImageResizeOption
GetSignatureInfoContactInfo
GetSignatureInfoLocation
GetSignatureInfoName
GetSignatureInfoOf
GetSignatureInfoReason
GetSignatureInfoTime
GetSignatureIsTrusted
GetSignatureIsValid
GetSignatureNotaryInfo
GetSignaturePublicNotaryKey
GetSignatureRtcTime
GetSignatureSignedCms
GetSignedAttributesBioBlocks
GetSignedAttributesBioKey
GetSignedAttributesBioText
GetSignedAttributesContentDigest
GetSignedAttributesDeviceFirmwareVersion
GetSignedAttributesDeviceName
GetSignedAttributesDeviceSerialNumber
GetSignedAttributesDeviceTime
GetSignedAttributesDriverCertificate
GetSignedAttributesMessageDigestSha256
GetSignedAttributesNotaryInfo
GetSignedAttributesNotaryKey
GetSignedAttributesOf
GetSignedAttributesOf32
GetSignedAttributesOpenState
GetSignedCmsFirstSignerInfo
GetSignedCmsSha256
GetSignedDocumentHash
GetSignedXml
GetSignerInfoSignedAttributes
GetSignFinishedIsEnabled
GetSignFinishedMillisecondsTimeout
GetSignTimeoutMilliseconds
GetTextAll
GetTextArgsDefault
GetTextFieldDoNotScroll
GetTextFieldDoNotSpellCheck
GetTextFieldIsFileSelect
GetTextFieldIsMultiLine
GetTextFieldIsPassword
GetTextFieldMaxLen
GetTextFieldText
GetTextFieldTextAppearance
GetTextInvalid
GetTextPages
GetX509CertificateFromPkcs12AndPassword
GetX509CertificateSignedHashSha256
LoadPdf
PrepareSignatureSha256
Print
PrintWithArgs
RenameFileOnDevice
RenderPageAsPng
RenderPageWithDpiAsPng
ResetDevice
SDialogClearDisplay
SDialogSetFontFromPath
SDialogSetImage
SDialogSetImageFromPath
SDialogSetMode
SDialogSetText
SDialogUpdateDisplay
SetAdminKeyToUnlockDevice
SetBehaviourClick
SetBehaviourDoDigestAction
SetBehaviourDoHardwareSign
SetBehaviourExternalSignatureImage
SetBehaviourSignInDocument
SetBehaviourStamp
SetBehaviourUseRectangle
SetBehaviourUseTsa
SetButtonCallback
SetButtonConfigColor
SetButtonConfigEnabled
SetButtonConfigs
SetButtonConfigVisible
SetCheckBoxIsChecked
SetChoiceFieldSelection
SetChoiceFieldSelectionN
SetCommunicationType
SetContinuousScrollCallback
SetContinuousScrollMode
SetContinuousScrollTile
SetContinuousScrollTileFromPath
SetContinuousScrollTileNumber
SetCustomerLogoMode
SetDevice
SetDeviceBrightness
SetDeviceCryptoId
SetDeviceDisplayOrientation
SetDeviceTransPortProtocol
SetDisconnectCallback
SetDocSignRectangleBorderColor
SetDocSignRectangleBorderWidth
SetDocSignRectangleColor
SetDocumentViewing
SetDocumentViewingFromPath
SetDriverLicenseString
SetDriverXmlCertificate
SetDriverXmlCertificateFromPath
SetFieldReadOnly
SetFinalDocumentHash32
SetFinalDocumentHash32Async
SetFinalDocumentHash32Blocking
SetKeyForRealTimeDecryptionFromPemPath
SetLanguage
SetLanguageFromString
SetLicense
SetPalette
SetPenCallback
SetPreliminaryDocumentHash32
SetPrintArgsDocPath
SetPrintArgsPrintService
SetPrintArgsWithoutDialog
SetPromoScreenFromPath
SetRadioButtonSelection
SetRadioButtonSelectionN
SetSignatureFieldSignedCms
SetSignatureImageAlignment
SetSignatureImageBackgroundColor
SetSignatureImageLineColor
SetSignatureImageLineWidth
SetSignatureImageResizeOption
SetSignatureRectangle
SetSignatureRectangleAndScrolling
SetSignatureRectangleStandard
SetSignatureRectangleWindow
SetSignBackground
SetSignBackgroundAndPageNumber
SetSignBackgroundFromPath
SetSignCertFromPkcs12Path
SetSignCertFromStore
SetSignCertToDefault
SetSignedAttributesBioBlocks
SetSignedAttributesBioText
SetSignedAttributesDeviceFirmwareVersion
SetSignedAttributesDeviceName
SetSignedAttributesDeviceSerialNumber
SetSignedAttributesDeviceTime
SetSignedAttributesDriverCertificate
SetSignedAttributesNotaryInfo
SetSignedAttributesNotaryKey
SetSignedAttributesOpenState
SetSignFinishedCallback
SetSignFinishedIsEnabled
SetSignFinishedMillisecondsTimeout
SetSignHasTimedOutCallback
SetSignImageChangedCallback
SetSignImageChangedMillisecondsThrottle
SetSigningUpdateCallback
SetSignKeyFromPemPath
SetSignStartedCallback
SetSignText
SetSignTimeoutMilliseconds
SetTextArgsEnd
SetTextArgsSortByPosition
SetTextArgsStart
SetTextFieldText
SignSignatureField
StartSignatureMode
StartXmlSigning
StopSignatureCapture
Subtract
TerminateService
UpdatePaletteColors
ViewDocument


AddSignatureField

Adds a signature field to the AcroForm.

int32_t AddSignatureField(intptr_t fieldName, double row0, double column0, double row1, double column1, int32_t pageNumber);

# Parameter Description
1 fieldName The partial field name of the new field as a character string without dots.
2 row0 The upper row of the field.
3 column0 The left margin.
4 row1 The lower margin.
5 column1 The right margin.
6 pageNumber The zero-based page number.
Returns

0 in case of success.


CalibrateSensor

Starts a sensor calibration.

int32_t CalibrateSensor(void);

Returns

0 in case of success.


CheckConnectedDevice

Checks whether a device is connected.

int32_t CheckConnectedDevice(intptr_t deviceName);

# Parameter Description
1 deviceName The name of the device as a character string.
Returns

Nonzero if the device is not connected.


ClearLcd

For devices with black and white display: Resets the signing background to a default image.

int32_t ClearLcd(void);

Returns

0 in case of success.


ConvertImageToSoi

Converts an image to a SOI image.

int32_t ConvertImageToSoi(intptr_t pathToImage, intptr_t pathToSoi);

# Parameter Description
1 pathToImage Path to the image as a character string.
2 pathToSoi Path to write the SOI to as a character string.
Returns

0 in case fo success.


ConvertSoiToImage

Converts images in SOI format to to BMP, JPG, PNG files

int32_t ConvertSoiToImage(intptr_t pathToSoi, intptr_t pathToImage);

# Parameter Description
1 pathToSoi The path to the SOI as a character string.
2 pathToImage The path to the output image as a character string.
Returns

0 in case of success.

Remarks

The file ending influences the output image format.


CopyFileFromDevice

Copies a file from the filesystem of the signature device to a local storage location.

int32_t CopyFileFromDevice(intptr_t deviceFileName, intptr_t path);

# Parameter Description
1 deviceFileName The name of the file on the device as a character string.
2 path The path to save the file to as a character string.
Returns

0 in case of success.


CopyFileToDevice

Copies a file from the local filesystem to the filesystem of the device.

int32_t CopyFileToDevice(intptr_t path, intptr_t deviceFileName);

# Parameter Description
1 path The path to the local file.
2 deviceFileName The name of the file on the device.
Returns

0 in case of success.


DecryptAesKeyWithPemPath

Decrypts the encrypted AES key by means of the preliminary document hash and a private RSA key.

intptr_t DecryptAesKeyWithPemPath(intptr_t encryptedAesKey, intptr_t preliminaryDocumentHash, intptr_t pemPath);

# Parameter Description
1 encryptedAesKey The encrypted AES key as length-prefixed octets.
2 preliminaryDocumentHash The preliminary document hash as length-prefixed octets.
3 pemPath The path to the PEM file containing the private RSA key.
Returns

The AES key, 32 octets. Null in case of error.

Remarks

See GetEncryptedAesKey.


DecryptBioText32

Decrypts the encrypted biodata text with the given AES key.

intptr_t DecryptBioText32(intptr_t bioText, intptr_t aesKey);

# Parameter Description
1 bioText The text.
2 aesKey The AES key, 32 octets.
Returns

The biodata text. Null in case of error.


DeleteFile

Deletes a file on the filesystem of the device.

int32_t DeleteFile(intptr_t fileInfo);

# Parameter Description
1 fileInfo A handle to a file info object.
Returns

0 in case of success.


DeleteFileWithName

Deletes a file on the filesystem of the device.

int32_t DeleteFileWithName(intptr_t fileName);

# Parameter Description
1 fileName The name of the file as a character string.
Returns

0 in case of success.

Remarks

The name of a file info object may be gotten through "GetFileInfoName".


DeletePromoScreen

Deletes a promoscreen from the device.

int32_t DeletePromoScreen(int32_t number, int32_t orientation);

# Parameter Description
1 number The number of the promoscreen ([0-9]).
2 orientation The orientation: default(0), upside down(1), 90°(2), 270°(3).
Returns

0 in case of success.

Remarks

Each display orientation can have its own sequence of promoscreens.


DeviceSearch

Search and select a device with a window.

intptr_t DeviceSearch(int32_t filter);

# Parameter Description
1 filter
Returns

Length-prefixed array of character strings.

Remarks

See EnumerateDevices.


DialogAddCustomButton

Adds a custom button to the dialog button bar.

int32_t DialogAddCustomButton(intptr_t buttonName, intptr_t imagePath, intptr_t pressedImagePath, intptr_t disabledImagePath, int32_t buttonNumber);

# Parameter Description
1 buttonName The name of the button as a character string.
2 imagePath The appearance of the button as a path to an image file as a character string.
3 pressedImagePath The appearance of the button in the pressed state as a path to an image file as a character string.
4 disabledImagePath The appearance of the button in the disabled state as a path to an image file as a character string.
5 buttonNumber The button number: 1, 2, 3, 4.
Returns

0 in case of success.


DialogAddKeyboard

Adds a keyboard to the dialog.

int32_t DialogAddKeyboard(intptr_t keyboardName, intptr_t row1Keys, intptr_t row2Keys, intptr_t row3Keys, intptr_t row4Keys);

# Parameter Description
1 keyboardName The name of the keyboard.
2 row1Keys The keys of the first row as a comma separated letters. A character string.
3 row2Keys The keys of the first row as a comma separated letters. A character string.
4 row3Keys The keys of the third ow as a comma separated letters. A character string.
5 row4Keys The keys of the fourth row as a comma separated letters. A character string.
Returns

0 in case of success.

Remarks

The keyboard size is fixed and the number of rows is fixed to four. The default keyboards have these names: "Deutsch", "DeutschGroß", "English", "EnglishCaps", "NumericNSymbolsKeyBoard". The default keyboards cannot be changed with this function.


DialogCreate

Creates a dialog with the current PDF document.

int32_t DialogCreate(int32_t pageNumber);

# Parameter Description
1 pageNumber The page number to start at.
Returns

0 in case of success.

Remarks

This requires a document to be loaded. Documents can be loaded by means of LoadPdfDocument.


DialogDeleteCustomButton

Deletes the custom dialog button.

int32_t DialogDeleteCustomButton(int32_t buttonNumber);

# Parameter Description
1 buttonNumber The button number: 1, 2, 3, 4.
Returns

0 in case of success.


DialogDeleteKeyboard

Sets the keyboard to use in the dialog.

int32_t DialogDeleteKeyboard(intptr_t keyboardName);

# Parameter Description
1 keyboardName The name of the keyboard.
Returns

0 in case of success.

Remarks

The default keyboards have these names: "Deutsch", "DeutschGroß", "English", "EnglishCaps", "NumericNSymbolsKeyBoard". A custom keyboards has the name with which it was added; see DialogAddKeyboard.


DialogDisableFormFields

Disables all form fields except signature fields.

int32_t DialogDisableFormFields(void);

Returns

0 in case of success.


DialogGetAvailableDefaultKeyboards

Gets the available default keyboards.

intptr_t DialogGetAvailableDefaultKeyboards(void);

Returns

A length-prefixed array of character strings.


DialogGetBottomMargin

Gets the lower crop margin.

int32_t DialogGetBottomMargin(void);

Returns

The bottom margin.


DialogGetCheckBoxColor

Gets the top crop margin.

int32_t DialogGetCheckBoxColor(void);

Returns

The top margin.


DialogGetDefaultCapsKeyboard

Gets the dialog caps keyboard.

intptr_t DialogGetDefaultCapsKeyboard(void);

Returns

The keyboard name as a character string.


DialogGetDefaultKeyboard

Gets the dialog default keyboard.

intptr_t DialogGetDefaultKeyboard(void);

Returns

The keyboard name as a character string.


DialogGetDefaultSymbolsAndNumbersKeyboard

Gets the dialog default symbols-and-numbers-keyboard.

intptr_t DialogGetDefaultSymbolsAndNumbersKeyboard(void);

Returns

The keyboard name as a character string.


DialogGetDefaultTextCapture

Gets the dialog default text capture

int32_t DialogGetDefaultTextCapture(void);

Returns

Keyboards(0) or handwriting(1).


DialogGetEnableSaveButton

Gets whether the dialog save button is enabled.

int32_t DialogGetEnableSaveButton(void);

Returns

True(1) or false(0).


DialogGetEnableStartSignButton

Whether the dialog start signing button is enabled.

int32_t DialogGetEnableStartSignButton(void);

Returns

True(1) or false(0).


DialogGetLeftMargin

Gets the left crop margin.

int32_t DialogGetLeftMargin(void);

Returns

The left margin.


DialogGetRadioButtonColor

Gets the color of dialog radio buttons.

int32_t DialogGetRadioButtonColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetRightMargin

Gets the right crop margin.

int32_t DialogGetRightMargin(void);

Returns

The right margin.


DialogGetScrollButtonBackgroundColor

Gets the background color of the dialog scroll button.

int32_t DialogGetScrollButtonBackgroundColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetScrollButtonBackgroundPressedColor

Gets the background color of the dialog scroll button in the pressed state.

int32_t DialogGetScrollButtonBackgroundPressedColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetScrollButtonIconColor

Gets the icon color of the dialog scroll button.

int32_t DialogGetScrollButtonIconColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetScrollValue

Gets how far the dialog scroll button shall scroll.

int32_t DialogGetScrollValue(void);

Returns

The scroll value.


DialogGetSignatureFieldColor

Gets the color of the dialog signature fields.

int32_t DialogGetSignatureFieldColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetTextFieldColor

Gets the color of the dialog text fields.

int32_t DialogGetTextFieldColor(void);

Returns

The color as a 32-bit ARGB integer.


DialogGetTopMargin

Gets the top crop margin.

int32_t DialogGetTopMargin(void);

Returns

The top margin.


DialogMessageBox

Shows a message box in the dialog with a heading, a message and up to three buttons.

int32_t DialogMessageBox(intptr_t heading, intptr_t message, intptr_t buttonLabels);

# Parameter Description
1 heading The heading as a character string.
2 message The message as a character string.
3 buttonLabels The button labels as a comma separated list of words as a character string such as "Yes,Maybe,No".
Returns

0 in case of success.


DialogSave

Saves the changes made to the form fields.

intptr_t DialogSave(intptr_t path);

# Parameter Description
1 path The path to probably save the document to.
Returns

The path of the saved file as a character string. Null in case of error.

Remarks

Call DialogCreate before. If signature fields shall be signed call DialogStartSignature.


DialogSetBottomMargin

Sets the bottom crop margin.

int32_t DialogSetBottomMargin(int32_t bottomMargin);

# Parameter Description
1 bottomMargin The bottom margin.
Returns

0 in case of success.

Remarks

Use this to hide superfluous whitespace at the lower edge of a document page.


DialogSetCallback

Sets a callback to call when a dialog button is pressed.

int32_t DialogSetCallback(/* void( *)(intptr_t) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0

Remarks

The callback is called with one argument that is structured memory. The argument contains the name of the scene, the name of the dialog component that was clicked, the type of that component and the dialog page number. Component types are NoComponent(0), Button(2), CheckBox(4).

Examples
                
            // C99, the type of the dialog callback parameter
            struct dialogArgs {
                char* SceneName;
                char* ComponentName;
                int32_t ComponentType;
                int32_t PageNumber;
            }
            
                                    

DialogSetCheckBoxColor

Sets the color of dialog check boxes.

int32_t DialogSetCheckBoxColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetDefaultCapsKeyboard

Sets the dialog caps keyboard.

int32_t DialogSetDefaultCapsKeyboard(intptr_t keyboard);

# Parameter Description
1 keyboard The keyboard name as a character string.
Returns

0 in case of success.


DialogSetDefaultKeyboard

Sets the dialog default keyboard.

int32_t DialogSetDefaultKeyboard(intptr_t keyboard);

# Parameter Description
1 keyboard The keyboard name as a character string.
Returns

0 in case of success.


DialogSetDefaultSymbolsAndNumbersKeyboard

Sets the dialog default symbols-and-numbers-keyboard.

int32_t DialogSetDefaultSymbolsAndNumbersKeyboard(intptr_t keyboard);

# Parameter Description
1 keyboard The keyboard name as a character string.
Returns

0 in case of success.


DialogSetDefaultTextCapture

Sets the dialog default text capture

int32_t DialogSetDefaultTextCapture(int32_t textCapture);

# Parameter Description
1 textCapture Whether to use keyboards (0) or handwriting (1).
Returns

0 in case of success.


DialogSetEnableSaveButton

Enables or disables the dialog save button.

int32_t DialogSetEnableSaveButton(int32_t enable);

# Parameter Description
1 enable Wheter to enable(1) or disable(0).
Returns

0 in case of success.


DialogSetEnableStartSignButton

Enables or disables the dialog start signing button.

int32_t DialogSetEnableStartSignButton(int32_t enable);

# Parameter Description
1 enable Wheter to enable(1) or disable(0).
Returns

0 in case of success.


DialogSetLeftMargin

Sets the left crop margin.

int32_t DialogSetLeftMargin(int32_t leftMargin);

# Parameter Description
1 leftMargin The left margin.
Returns

0 in case of success.

Remarks

Use this to hide superfluous whitespace at the left edge of a document page.


DialogSetRadioButtonColor

Sets the color of the dialog radio buttons.

int32_t DialogSetRadioButtonColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetRightMargin

Sets the right crop margin.

int32_t DialogSetRightMargin(int32_t rightMargin);

# Parameter Description
1 rightMargin The right margin.
Returns

0 in case of success.

Remarks

Use this to hide superfluous whitespace at the right edge of a document page.


DialogSetScrollButtonBackgroundColor

Sets the background color of the dialog scroll button.

int32_t DialogSetScrollButtonBackgroundColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetScrollButtonBackgroundPressedColor

Sets the background color of the dialog scroll button in the pressed state.

int32_t DialogSetScrollButtonBackgroundPressedColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetScrollButtonIconColor

Sets the icon color of the dialog scroll button.

int32_t DialogSetScrollButtonIconColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetScrollValue

Sets how far the dialog scroll button shall scroll.

int32_t DialogSetScrollValue(int32_t scrollValue);

# Parameter Description
1 scrollValue The scroll value.
Returns

0 in case of success.


DialogSetSignatureFieldColor

Sets the color of the dialog signature fields.

int32_t DialogSetSignatureFieldColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetTextFieldColor

Sets the color of the dialog text fields.

int32_t DialogSetTextFieldColor(int32_t color);

# Parameter Description
1 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.


DialogSetTopMargin

Sets the top crop margin.

int32_t DialogSetTopMargin(int32_t topMargin);

# Parameter Description
1 rightMargin The top margin.
Returns

0 in case of success.

Remarks

Use this to hide superfluous whitespace at the upper edge of a document page.


DownloadPdf

Downloads the document.

intptr_t DownloadPdf(void);

Returns

The document as length-prefixed octets.


DrawImage

Draws an image to the given position.

int32_t DrawImage(intptr_t fieldPosition, intptr_t image);

# Parameter Description
1 fieldPosition The position as a field position handle.
2 image The image as length-prefixed buffer.
Returns

0 in case of success.


Echo

For testing. Copies the given text and returns it.

intptr_t Echo(intptr_t text);

# Parameter Description
1 text The text as a character string.
Returns

A copy of the given text.


EnumerateDevices

Gets the names of the available devices.

intptr_t EnumerateDevices(void);

Returns

A length-prefixed array of character strings. Null in case of error or zero devices.

Remarks

The first element in the array contains the number of devices. The remaining elements are the adresses of character strings containing the device names.

Examples
                
             // C++
             // Fills the given container with the device names by means of the library instance mod.
             int EnumerateDevices(void* mod, std::vector<std::string>& devices)
             {
                 PtrPtr_ft enumerateDevices = (PtrPtr_ft)get_export(mod, "EnumerateDevices");
                 if (!enumerateDevices) return EXIT_FAILURE;
            
             	intptr_t** deviceNames = enumerateDevices();
                 if (NULL == deviceNames) return EXIT_FAILURE;
             
             	int number = (size_t)deviceNames[0];
             	intptr_t** entries = &deviceNames[1];
             	for (int k = 0; k < number; k++)
             	{
             		devices.push_back(std::string((char*)entries[k], std::allocator<char>()));
             	}
             	Free(mod, deviceNames);
             	return 0;
             } 
             
                                    

EnumerateDevicesFilter

Gets the names of the available filtered devices.

intptr_t EnumerateDevicesFilter(int32_t filter);

# Parameter Description
1 filter The device filter.
Returns

A length-prefixed character string pointer array. Null in case of error or zero devices.

Examples
                
            //C99
            enum deviceFilter {
                No,
                StepOver,
                TabletPc,
                Topaz,
                NaturaSignV1,
                SmartPhone,
                MSInkTablet,
                NaturaSignV3,
                NaturaSignColour,
                NaturaSignColourM,
                NaturaSignColourM2,
                NaturaSignMobile,
                NaturaSignFlawless,
                NaturaSignComfort,
                NaturaSignClassic,
                NaturaSignBiometric,
                NaturaSignMobile15,
                NaturaSignColorPad2,
                NaturaSignUniversal,
                NaturaSignBrilliance,
                DuraSignBiometric,
                NaturaSignColourBiometric,
                NaturaSignMobileBiometric,
                DuraSignGen13Standard,
                DuraSignGen13Biometric
            };
            
                                    

ExtractText

Extracts Text from the Documenty

intptr_t ExtractText(intptr_t textArgs);

# Parameter Description
1 textArgs Pass zero to extract all Text
Returns

TextObject if successful

Remarks

To be used with GetTextAll()


FindText

Finds text.

intptr_t FindText(intptr_t text);

# Parameter Description
1 text The text to search.
Returns

A length-prefixed array of structured field positions.

Examples
                
            // C99
            struct fieldPosition {
            	double Row0;
            	double Column0;
            	double Row1;
            	double Column1;
            	int32_t PageNumber;
            	double PageWidth;
            	double PageHeight;
            };
            
            fieldPosition** FindText(void* mod, char* text)
            {
            	FindText_ft findText = (FindText_ft)get_export(mod, "FindText");
            	return (fieldPosition**)findText(text);
            
            }
            
            void FindTextAndPrint(void* mod, char* text)
            {
            	fieldPosition** thePositions = FindText(mod, text);
            	if (NULL == thePositions) {
            		printf("Could not find the text '%s'.\n", text);
            		return;
            	}
            
            	size_t count = (size_t)thePositions[0];
            	printf("Found the text '%s' %d times,\n", text, (int)count);
            	for (int k = 1; k <= count; k++)
            	{
            		fieldPosition* pos = thePositions[k];
            		printf("at page %d\n", pos->PageNumber);
            		printf("(row, column) = (%.1f, %.1f),\n", pos->Column0, pos->Column1);
            		printf("(width, height) = (%.1f, %.1f),\n", pos->Column1 - pos->Column0, pos->Row1 - pos->Row0);
            		printf("The page has the (width, height) = (%.1f, %.1f);\n", pos->PageWidth, pos->PageHeight);
            	}
            	Free(mod, thePositions);
            }
            
                                    

Free

Frees the object with the given address.

int32_t Free(intptr_t ptr);

# Parameter Description
1 ptr Pointer to the object.
Returns

0 in case of success


FreeAll

Frees all allocated objects.

int32_t FreeAll(void);

Returns

0 in case of success


GetAcroFormFields

Gets the AcroForm fields.

intptr_t GetAcroFormFields(void);

Returns

A length-prefixed array of field handles.


GetBehaviourDefault

Gets the default behaviour.

intptr_t GetBehaviourDefault(void);

Returns

A behaviour object handle. Null in case of error.


GetBioData

Gets the biometric data.

intptr_t GetBioData(int32_t format);

# Parameter Description
1 format Pass 0.
Returns

A character string. Null in case of error.


GetButtonConfigColor

Gets the color of the button config.

int32_t GetButtonConfigColor(intptr_t buttonConfig);

# Parameter Description
1 buttonConfig The button config handle.
Returns

The color as 32-bit ARGB integer.


GetButtonConfigEnabled

Gets the enabled flag of the button config.

int32_t GetButtonConfigEnabled(intptr_t buttonConfig);

# Parameter Description
1 buttonConfig The button config handle.
Returns

Whether the enabled flag is set (1) or not (0).


GetButtonConfigKind

Gets the kind of the button config.

int32_t GetButtonConfigKind(intptr_t buttonConfig);

# Parameter Description
1 buttonConfig The button config handle.
Returns

The button kind: Unknown (0), Rotate (1), Next (2), Prev (3), Ok (4), Repeat (5), Cancel (6), ZoomIn (7), ZoomOut (8), StartSignature (9), Rotate90 (10).


GetButtonConfigs

Gets the button configurations in the current device mode.

intptr_t GetButtonConfigs(void);

Returns

The buffon configs as a length-prefixed array. Null in case of error.

Remarks

Use SetButtonConfigEnabled, SetButtonConfigVisble and SetButtonConfigColor to change the button configs. Use SetButtonConfigs send the changed button configs to the device.


GetButtonConfigsInMode

Gets the button configurations in the given device mode.

intptr_t GetButtonConfigsInMode(int32_t mode);

# Parameter Description
1 mode Which mode: standard signing mode (0), document viewing mode (5), document signing mode (6).
Returns

The buffon configs as a length-prefixed array. Null in case of error.

Remarks

See GetButtonConfigs().


GetButtonConfigVisible

Gets the visible flag of the button config.

int32_t GetButtonConfigVisible(intptr_t buttonConfig);

# Parameter Description
1 buttonConfig The button config handle.
Returns

Whether the visible flag is set (1) or not (0).


GetCheckBoxIsChecked

Gets whether the check box is checked.

int32_t GetCheckBoxIsChecked(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle A check box field handle.
Returns

True(1) or false(0) in case of success.


GetChoiceFieldChoices

Gets the choice field choices.

intptr_t GetChoiceFieldChoices(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

A length-prefixed array of character strings. Similar to EnumerateDevices. Null if empty or in case of error.


GetChoiceFieldDisplayValues

Gets the choice field display values.

intptr_t GetChoiceFieldDisplayValues(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

A length-prefixed array of character strings. Similar to EnumerateDevices. Null if empty or in case of error.


GetChoiceFieldDoNotSpellCheck

Gets the 'DoNotSpellCheck' flag of a choice field.

int32_t GetChoiceFieldDoNotSpellCheck(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

True(1) or false(0) in case of success.


GetChoiceFieldIsCommitOnSetChange

Gets the 'CommitOnSetChange' of a choice field.

int32_t GetChoiceFieldIsCommitOnSetChange(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

True(1) or false(0) in case of success.


GetChoiceFieldIsMultiSelect

Gets the 'MultiSelect' flag of a choice field

int32_t GetChoiceFieldIsMultiSelect(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

True(1) or false(0) in case of success.


GetChoiceFieldIsSort

Gets the 'Sort' flag of a choice field.

int32_t GetChoiceFieldIsSort(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

True(1) or false(0) in case of success.


GetChoiceFieldSelection

Gets the choice field selection.

intptr_t GetChoiceFieldSelection(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

A length-prefixed array of character strings. Similar to EnumerateDevices. Null if empty or in case of error.


GetChoiceFieldTextAppearance

Gets the text appearance of a choice field.

intptr_t GetChoiceFieldTextAppearance(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The choice field handle.
Returns

The text appearance handle. Null in case of error.

Examples
                
            // C99
            // Gets the text appearance of the first choice field and prints it to the console using the library instance 'mod'.
            
            char* loadLengthPrefixedOctetsFromPath(const char* path) {
            	FILE* fp = fopen(path, "rb");
            
            	fpos_t start;
            	fgetpos(fp, &start);
            
            	fseek(fp, 0, SEEK_END);
            	int32_t size = ftell(fp);
            	fsetpos(fp, &start);
            
            	char* buffer = new char[4 + size];
            	((int32_t*)buffer)[0] = size;
            	fread(&buffer[4], 1, size, fp);
            
            	fclose(fp);
            	return buffer;
            }
            
            int LoadTheDocument(void* mod) {
            	const char* pathToDoc = "TheDocument.pdf";
            	char* lengthPrefixedDocumentOctets = loadLengthPrefixedOctetsFromPath(pathToDoc);
            	int retval = LoadPdf(mod, lengthPrefixedDocumentOctets);
            	free(lengthPrefixedDocumentOctets);
            	return retval;
            }
            
            int GetNumberOfPages(void* mod)
            {
            	Int_ft getNumberOfPages = (Int_ft)get_export(mod, "GetNumberOfPages");
            	RETURN_FAIL_IF_FALSE(getNumberOfPages, "Failed to get getNumberOfPages export\n");
            	return getNumberOfPages();
            }
            
            struct fieldPosition {
            	double Row0;
            	double Column0;
            	double Row1;
            	double Column1;
            	int PageNumber;
            	double PageWidth;
            	double PageHeight;
            };
            
            intptr_t** getAcroFormFields(void* mod)
            {
            	PtrPtr_ft getAcroFormFields = (PtrPtr_ft)get_export(mod, "GetAcroFormFields");
            	return getAcroFormFields();
            }
            
            int getFieldIsChoiceField(void* mod, intptr_t* fieldHandle)
            {
            	Ptr_int_ft func = (Ptr_int_ft)get_export(mod, "GetFieldIsChoiceField");
            	return (NULL != func) ? func(fieldHandle) : 0;
            }
            
            intptr_t* getFirstChoiceField(void* mod, intptr_t** lpFields)
            {
            	size_t length = (size_t)lpFields[0];
            	for (int k = 1; k <= length; k++) {
            		if (getFieldIsChoiceField(mod, lpFields[k]))
            			return lpFields[k];
            	}
            	return NULL;
            }
            
            struct textAppearance {
            	int Font;
            	int FontSize;
            	double Red;
            	double Green;
            	double Blue;
            	double Gray;
            	int IsGray;
            };
            
            textAppearance* getChoiceFieldTextAppearance(void* mod, intptr_t* fieldHandle)
            {
            	Ptr_Ptr_ft getTextAppearance = (Ptr_Ptr_ft)get_export(mod, "GetChoiceFieldTextAppearance");
            	return (textAppearance*)getTextAppearance(fieldHandle);
            }
            
            void getTextAppearanceOfFirstChoiceFieldAndPrint(void* mod)
            {
            	int ret = LoadTheDocument(mod);
            	intptr_t** lpFields = getAcroFormFields(mod);
            	if (NULL == lpFields || 0 == lpFields[0]) return;
            
            	intptr_t* firstChoiceField = getFirstChoiceField(mod, lpFields);
            	if (NULL == firstChoiceField) return;
            
            	textAppearance* tea = getChoiceFieldTextAppearance(mod, firstChoiceField);
            	if (NULL != tea) {
            		printf("The fontSize is %d.\n", tea->FontSize);
            		if (tea->IsGray)
            		{
            			printf("The text is gray: %.2f.\n", tea->Gray);
            		}
            		else printf("The field has color, (R, G, B) = (%.2f, %.2f, %.2f).\n", tea->Red, tea->Green, tea->Blue);
            	}
            	Free(mod, tea);
            	Free(mod, lpFields);
            }
            
                                    

GetCryptoIdDescription

Gets the description of the given crypto ID object.

intptr_t GetCryptoIdDescription(intptr_t cryptoId);

# Parameter Description
1 cryptoId A handle to a crypto ID object. See GetDeviceAllCryptoIds.
Returns

The description. Null in case of error.


GetCryptoIdPadCertLength

Gets the pad cert length of the given crypto ID object.

int32_t GetCryptoIdPadCertLength(intptr_t cryptoId);

# Parameter Description
1 cryptoId A handle to a crypto ID object. See GetDeviceAllCryptoIds.
Returns

The length or a negative number in case of error.


GetCryptoIdPadNotaryLength

Gets the pad notary length of the given crypto ID object.

int32_t GetCryptoIdPadNotaryLength(intptr_t cryptoId);

# Parameter Description
1 cryptoId A handle to a crypto ID object. See GetDeviceAllCryptoIds.
Returns

The length or a negative number in case of error.


GetDefaultTextBuilderOf

Gets a text builder object.

intptr_t GetDefaultTextBuilderOf(int32_t useSigner, int32_t useReason, int32_t useLocation, int32_t useTime);

# Parameter Description
1 useSigner Whether the signer line shall be used. True(1) or false(0).
2 useReason Whether the reason line shall be used. True(1) or false(0).
3 useLocation Whether the location line shall be used. True(1) or false(0).
4 useTime Whether the time shall be used. True(1) or false(0).
Returns

A text builder object handle. Null in case of error.

Remarks

This text builder prints up to four lines using the signer infos.


GetDeviceCryptoIdInfo

Gets the crypto ID information of the device as text.

intptr_t GetDeviceCryptoIdInfo(void);

Returns

The info as a character string. Null in case of error.


GetDeviceCryptoIds

Gets the available crypto IDs for the selected device.

intptr_t GetDeviceCryptoIds(void);

Returns

A length-prefixed array of crypto ID objects. Null in case of error or empty.


GetDeviceDisplayHeight

Gets the display height.

int32_t GetDeviceDisplayHeight(void);

Returns

The height. Negative in case of error.


GetDeviceDisplayHeightInMillimeters

Gets the display height.

double GetDeviceDisplayHeightInMillimeters(void);

Returns

The height in millimeters. Negative in case of error.


GetDeviceDisplayHeightSansButtonBar

Gets the display height sans the button bar.

int32_t GetDeviceDisplayHeightSansButtonBar(void);

Returns

The height. Negative in case of error.


GetDeviceDisplaySize

Gets the device display size with respect to the current orientation.

intptr_t GetDeviceDisplaySize(void);

Returns

The display size as structured memory. Null in case of error.

Examples
                
            // C99
            struct displaySize {
                int32_t width;
                int32_t height;
            };
            
                                    

GetDeviceDisplaySizeSansBar

Gets the device display size without the button bar with respect to the current orientation.

intptr_t GetDeviceDisplaySizeSansBar(void);

Returns

The display size as structured memory. Null in case of error.

Remarks

See GetDeviceDisplaySize.


GetDeviceDisplayWidth

Gets the display width.

int32_t GetDeviceDisplayWidth(void);

Returns

The width. Negative in case of error.


GetDeviceDisplayWidthInMillimeters

Gets the display width.

double GetDeviceDisplayWidthInMillimeters(void);

Returns

The width in millimeters. Negative in case of error.


GetDeviceDisplayWidthSansButtonBar

Gets the display width sans the button bar.

int32_t GetDeviceDisplayWidthSansButtonBar(void);

Returns

The width. Negative in case of error.


GetDeviceFeatures

Gets the device features.

intptr_t GetDeviceFeatures(void);

Returns

The device features as structured memory. Null in case of error.

Examples
                
            // C99. The device features struct
            struct deviceFeatures {
                int32_t Reserved;
                int32_t ColorDevice;
                int32_t PortraitMode;
                int32_t Empen;
                int32_t EmpenUpdate;
                int32_t ConfigPromoScreenDelay;
                int32_t SimpleDialog;
                int32_t ContinuousScrolling;
                int32_t SOIFormat;
                int32_t VCom;
                int32_t TouchConfig;
                int32_t EnhancedCryptoId;
                int32_t OpenStateDetection;
                int32_t BrightnessChange;
                int32_t InternalCLK;
            };
            
                                    

GetDeviceFirmwareVersion

Gets the firmware version of the device.

intptr_t GetDeviceFirmwareVersion(void);

Returns

The firmware version as a character string. Null if unknown or in case of error


GetDeviceFreeRamSize

Gets the free RAM size.

int32_t GetDeviceFreeRamSize(void);

Returns

The free RAM size. Negative in case of error.


GetDevicePadOpenState

Gets the open state.

int32_t GetDevicePadOpenState(void);

Returns

The open state. Negative in case of error.


GetDevicePixelSize

Gets the device pixel size with respect to the current orientation.

intptr_t GetDevicePixelSize(void);

Returns

The pixel size as structured memory. Compare with GetDisplaySize. Null in case of error.


GetDeviceProductId

Gets the product ID of the device.

int32_t GetDeviceProductId(void);

Returns

The product ID. Negative in case of error.


GetDeviceProductName

Gets the name of the device.

intptr_t GetDeviceProductName(void);

Returns

The name as a character string. Null if unknown or in case of error.


GetDeviceSerialNumber

Gets the serial number of the device.

intptr_t GetDeviceSerialNumber(void);

Returns

A character string or null in case of error.


GetDeviceState

Gets the device state.

intptr_t GetDeviceState(void);

Returns

The device state as structured memory. Null in case of error.

Examples
                
            // C99. The device state struct
            struct deviceState {
                int32_t IsValid;
                int32_t PadLocked;
                int32_t AdminKeySet;
                int32_t PreDocHashSet;
                int32_t FinalDocHashSet;
                int32_t AesContextSet;
                int32_t Mode;
                int32_t Rotated;
                int32_t RsaSignStatus;
                int32_t ButtonEvent;
                int32_t BatteryState;
                int32_t RotationButtonVisible;
                int32_t Brightness;
                int32_t OpenState;
                int32_t UserScriptExecutionState;
                int32_t ConfigurationState;
                int32_t ErrorFlags;
            };
            
                                    

GetDeviceTouchHeight

Gets the height of the touch pad.

int32_t GetDeviceTouchHeight(void);

Returns

The height. Negative in case of error.


GetDeviceTouchWidth

Gets the width of the touch pad.

int32_t GetDeviceTouchWidth(void);

Returns

The width. Negative in case of error.


GetDeviceTransPortProtocol

Gets the device Transport Protocol.

int32_t GetDeviceTransPortProtocol(void);

Returns

0 = USB-HID, 2 = VCOM, 1 = Not used, 3 = error


GetDeviceVendorId

Gets the vendor ID of the device.

int32_t GetDeviceVendorId(void);

Returns

The vendor ID. Negative in case of error.


GetDeviceVendorName

Gets the name of the device vendor.

intptr_t GetDeviceVendorName(void);

Returns

The vendor name as a character string. Null if unknown or in case of error


GetDocSignRectangleFromBottomLeftAndWidthHeight

A rectangle with respect to the lower left corner of the device display. This rectangle is to be shown with given width, height of the rectangle in mm.

intptr_t GetDocSignRectangleFromBottomLeftAndWidthHeight(int32_t bottom, int32_t left, int32_t width, int32_t height);

# Parameter Description
1 bottom The distance to the lower border in mm.
2 left The distance to the left border in mm.
3 width The desired with in mm.
4 height The desired height in mm.
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromBottomLeftAndZoomLevel

Gets a DocSignRectangle object with respect to the lower left corner of the device display. The document is to be shown with the given zoom level.

intptr_t GetDocSignRectangleFromBottomLeftAndZoomLevel(int32_t bottom, int32_t left, int32_t zoomLevel);

# Parameter Description
1 bottom The distance to the lower border in mm.
2 left The distance to the left border in mm.
3 zoomLevel The desired zoom level: FitPage(0), FitHeight(1), FitWidth(2), Maximum(3).
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromBottomRightAndWidthHeight

A rectangle with respect to the lower right corner of the device display. This rectangle is to be shown with given width, height of the rectangle in mm.

intptr_t GetDocSignRectangleFromBottomRightAndWidthHeight(int32_t bottom, int32_t right, int32_t width, int32_t height);

# Parameter Description
1 bottom The distance to the lower border in mm.
2 right The distance to the right border in mm.
3 width The desired with in mm.
4 height The desired height in mm.
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromBottomRightAndZoomLevel

Gets a DocSignRectangle object with respect to the lower right corner of the device display. The document is to be shown with the given zoom level.

intptr_t GetDocSignRectangleFromBottomRightAndZoomLevel(int32_t bottom, int32_t right, int32_t zoomLevel);

# Parameter Description
1 bottom The distance to the lower border in mm.
2 right The distance to the right border in mm.
3 zoomLevel The desired zoom level: FitPage(0), FitHeight(1), FitWidth(2), Maximum(3).
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromTopLeftAndWidthHeight

A rectangle with respect to the upper left corner of the device display. This rectangle is to be shown with given width, height of the rectangle in mm.

intptr_t GetDocSignRectangleFromTopLeftAndWidthHeight(int32_t top, int32_t left, int32_t width, int32_t height);

# Parameter Description
1 top The distance to the upper border in mm.
2 left The distance to the left border in mm.
3 width The desired with in mm.
4 height The desired height in mm.
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromTopLeftAndZoomLevel

Gets a DocSignRectangle object with respect to the upper left corner of the device display. The document is to be shown with the given zoom level.

intptr_t GetDocSignRectangleFromTopLeftAndZoomLevel(int32_t top, int32_t left, int32_t zoomLevel);

# Parameter Description
1 top The distance to the upper border in mm.
2 left The distance to the left border in mm.
3 zoomLevel The desired zoom level: FitPage(0), FitHeight(1), FitWidth(2), Maximum(3).
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromTopRightAndWidthHeight

A rectangle with respect to the upper right corner of the device display. This rectangle is to be shown with given width, height of the rectangle in mm.

intptr_t GetDocSignRectangleFromTopRightAndWidthHeight(int32_t top, int32_t right, int32_t width, int32_t height);

# Parameter Description
1 top The distance to the upper border in mm.
2 right The distance to the right border in mm.
3 width The desired with in mm.
4 height The desired height in mm.
Returns

The DocSignRectangle object handle. Null in case of error.


GetDocSignRectangleFromTopRightAndZoomLevel

Gets a DocSignRectangle object with respect to the upper right corner of the device display. The document is to be shown with the given zoom level.

intptr_t GetDocSignRectangleFromTopRightAndZoomLevel(int32_t top, int32_t right, int32_t zoomLevel);

# Parameter Description
1 top The distance to the upper border in mm.
2 right The distance to the right border in mm.
3 zoomLevel The desired zoom level: FitPage(0), FitHeight(1), FitWidth(2), Maximum(3).
Returns

The DocSignRectangle object handle. Null in case of error.


GetDriverXmlCertificate

Gets the driver xml certificate.

intptr_t GetDriverXmlCertificate(void);

Returns

A length-prefixed buffer.


GetEncryptedAesKey

Gets the encrypted AES key.

intptr_t GetEncryptedAesKey(void);

Returns

A length-prefixed buffer.

Remarks

The length prefix is a 32 bit integer.


GetFieldIsButtonField

Gets whether the field is a button field.

int32_t GetFieldIsButtonField(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsCheckBox

Gets whether the field is a check box.

int32_t GetFieldIsCheckBox(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsChoiceField

Gets whether the field is a choice field.

int32_t GetFieldIsChoiceField(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsComboBox

Gets whether the field is a combo box.

int32_t GetFieldIsComboBox(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsListBox

Gets whether the field is a list box.

int32_t GetFieldIsListBox(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsPushButton

Gets whether the field is a push button.

int32_t GetFieldIsPushButton(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsRadioButton

Gets whether the field is a radio button.

int32_t GetFieldIsRadioButton(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsReadOnly

Gets the IsReadOnly flag of a field.

int32_t GetFieldIsReadOnly(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsSignatureField

Gets whether the field is a signature field.

int32_t GetFieldIsSignatureField(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldIsTextField

Gets whether the field is a text field.

int32_t GetFieldIsTextField(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

True(1) or false(0) in case of success.


GetFieldName

Gets the name of a field.

intptr_t GetFieldName(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

The name as a character string.


GetFieldPosition

Gets the position of a field.

intptr_t GetFieldPosition(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

The structured field position; see FindText. Null in case of error.


GetFieldType

Gets the field type of a field.

intptr_t GetFieldType(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The field handle.
Returns

The field type as a character string.


GetFileInfoName

Gets the name of a file info object.

intptr_t GetFileInfoName(intptr_t fileInfo);

# Parameter Description
1 fileInfo A handle to a file info object.
Returns

A character string. Null in case of error.

Remarks

Handles to file info objects can be gotten with the function GetFileInfos.


GetFileInfos

Gets info on the files stored on the signature device.

intptr_t GetFileInfos(void);

Returns

A length-prefixed array of file info objects. Null in case of error or empty.

Remarks

The first element of the array contains the length prefix. For example: [ 2, firstAdress, secondAdress ].


GetFileInfoSize

Gets the size of a file info object.

int32_t GetFileInfoSize(intptr_t fileInfo);

# Parameter Description
1 fileInfo A handle to a file info object.
Returns

A nonnegative number. Negative in case of error.


GetHello

For testing. Gets a character string.

intptr_t GetHello(void);

Returns

"Hello"


GetLastSigError

For testing.

int32_t GetLastSigError(void);

Returns

An error code.


GetNumberOfPages

Gets the number of pages.

int32_t GetNumberOfPages(void);

Returns

The number of pages.


GetPageDimensions

Gets the page dimensions.

intptr_t GetPageDimensions(void);

Returns

A length prefixed array of structured field positions, similar to FindText. Null if empty or in case of error.


GetPdfFromSignedXml

Downloads the document.

intptr_t GetPdfFromSignedXml(void);

Returns

The document as length-prefixed octets.


GetPrintArgsDefault

The default args print the loaded document with a dialog.

intptr_t GetPrintArgsDefault(void);

Returns

Changed print args.


GetRadioButtonChoices

Gets the radio button choices.

intptr_t GetRadioButtonChoices(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The radio button field handle.
Returns

A length-prefixed array of character strings. Similar to EnumerateDevices.


GetRadioButtonIsOff

Gets whether the radio button is off.

int32_t GetRadioButtonIsOff(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The radio button field handle.
Returns

True(1) or false(0).


GetRadioButtonPositions

Gets the radio button positions.

intptr_t GetRadioButtonPositions(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The radio button field handle.
Returns

A length-prefixed array of field positions. Similar to FindText. Null in case of error.


GetRadioButtonSelection

Gets the radio button selection.

intptr_t GetRadioButtonSelection(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The radio button field handle.
Returns

A length-prefixed array of character strings. Similar to EnumerateDevices.


GetRectangleFromBottomLeft

Gets a Rectangle object with respect to the Lower left corner of the device display and its width and height.

intptr_t GetRectangleFromBottomLeft(int32_t x, int32_t y, int32_t width, int32_t height);

# Parameter Description
1 x The distance to the lower border in mm.
2 y The distance to the left border in mm.
3 width The desired width in mm
4 height The desired width in mm
Returns

The SignRectangle object handle. Null in case of error.


GetRectangleFromBottomRight

Gets a Rectangle object with respect to the Lower Right corner of the device display and its width and height.

intptr_t GetRectangleFromBottomRight(int32_t x, int32_t y, int32_t width, int32_t height);

# Parameter Description
1 x The distance to the lower border in mm.
2 y The distance to the Right border in mm.
3 width The desired width in mm
4 height The desired width in mm
Returns

The SignRectangle object handle. Null in case of error.


GetRectangleFromTopLeft

Gets a Rectangle object with respect to the upper left corner of the device display and its width and height.

intptr_t GetRectangleFromTopLeft(int32_t x, int32_t y, int32_t width, int32_t height);

# Parameter Description
1 x The distance to the upper border in mm.
2 y The distance to the left border in mm.
3 width The desired width in mm
4 height The desired width in mm
Returns

The SignRectangle object handle. Null in case of error.


GetRectangleFromTopRight

Gets a Rectangle object with respect to the upper Right corner of the device display and its width and height.

intptr_t GetRectangleFromTopRight(int32_t x, int32_t y, int32_t width, int32_t height);

# Parameter Description
1 x The distance to the upper border in mm.
2 y The distance to the Right border in mm.
3 width The desired width in mm
4 height The desired width in mm
Returns

The SignRectangle object handle. Null in case of error.


GetRectangleStandard

Gets a Rectangle object with respect Standard.

intptr_t GetRectangleStandard(void);

Returns

The SignRectangle object handle. Null in case of error.


GetSignatureCertificate

intptr_t GetSignatureCertificate(int32_t swSign);

# Parameter Description
1 swSign
Returns


GetSignatureContentDigest

Gets the content digest of the signature.

intptr_t GetSignatureContentDigest(intptr_t signature);

# Parameter Description
1 signature The signature object.
Returns


GetSignatureFieldContentDigest

Gets the content digest for this signature field if present.

intptr_t GetSignatureFieldContentDigest(intptr_t fieldHandle);

# Parameter Description
1 signatureField The signature field handle.
Returns

A length-prefixed buffer. Null in case of absence or error.


GetSignatureFieldSignature

Gets a signature object from a signature field.

intptr_t GetSignatureFieldSignature(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The signature field handle.
Returns


GetSignatureFieldSignatureInfo

Gets a signature info from a signature field.

intptr_t GetSignatureFieldSignatureInfo(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The signature field handle.
Returns

A signature info object handle. Null in case of error.


GetSignatureImageAlignment

Gets the alignment to use when the keepAspectRatio resize option is set.

int32_t GetSignatureImageAlignment(void);

Returns

0 in case of success.


GetSignatureImageAsHBitmap

Gets the signature image.

intptr_t GetSignatureImageAsHBitmap(int32_t width, int32_t height);

# Parameter Description
1 width The width.
2 height The height.
Returns

A handle to the HBitmap. Null in case of error.

Remarks

The given arguments are only used if certain resize options are set with SetSignatureImageResizeOption.


GetSignatureImageAsPng

Gets the signature image

intptr_t GetSignatureImageAsPng(int32_t width, int32_t height);

# Parameter Description
1 width The width.
2 height The height.
Returns

The length-prefixed octets of a PNG encoded image.

Remarks

The length prefix is a 32 bit integer.

Examples
                
            // C99, using the library instance mod
            ReadSignatureImage_t readSignatureImage = (ReadSignatureImage_t)get_export(mod, "GetSignatureImageAsPng");
            if (!readSignatureImage) return EXIT_FAILURE;
            intptr_t* lpPngImage = readSignatureImage(400, 400);
            if (NULL == lpPngImage) return -1;
            int32_t length = lpPngImage[0];
            char* imageData = 4 + (char*)lpPngImage; //"‰PNG...",
            // Consider to Free(lpPngImage) the image when it is not needed anymore.
            
                                    

GetSignatureImageBackgroundColor

Gets the signature image background color.

int32_t GetSignatureImageBackgroundColor(void);

Returns

The background color as a 32-bit ARGB integer.


GetSignatureImageLineColor

Gets the color of the signature line.

int32_t GetSignatureImageLineColor(void);

Returns

The color as a 32-bit ARGB integer.


GetSignatureImageLineWidth

Gets the signature image line width.

double GetSignatureImageLineWidth(void);

Returns

The line width in arbitrary units.


GetSignatureImageResizeOption

Gets the signature image resize options.

int32_t GetSignatureImageResizeOption(void);

Returns

The resize options in arbitrary units.


GetSignatureInfoContactInfo

Gets the contact info of a signature info object.

intptr_t GetSignatureInfoContactInfo(intptr_t signatureInfo);

# Parameter Description
1 signatureInfo The signature info object handle.
Returns

The contact info as a character string. Null in case of absence or error.


GetSignatureInfoLocation

Gets the location of a signature info object.

intptr_t GetSignatureInfoLocation(intptr_t signatureInfo);

# Parameter Description
1 signatureInfo The signature info object handle.
Returns

The location as a character string. Null in case of absence or error.


GetSignatureInfoName

Gets the name of a signature info object.

intptr_t GetSignatureInfoName(intptr_t signatureInfo);

# Parameter Description
1 signatureInfo The signature info object handle.
Returns

The name as a character string. Null in case of absence or error.


GetSignatureInfoOf

Gets a signature info object from the given arguments.

intptr_t GetSignatureInfoOf(intptr_t name, intptr_t reason, intptr_t location, intptr_t contactInfo);

# Parameter Description
1 name The name of the signer.
2 reason The reason for signing.
3 location The location.
4 contactInfo The contact info of the signer.
Returns

A handle to a signature info object.

Remarks

All parameters are optional. Pass null to omit an argument.


GetSignatureInfoReason

Gets the reason of a signature info object.

intptr_t GetSignatureInfoReason(intptr_t signatureInfo);

# Parameter Description
1 signatureInfo The signature info object handle.
Returns

The reason as a character string. Null in case of absence or error.


GetSignatureInfoTime

Gets the time of a signature info object.

int64_t GetSignatureInfoTime(intptr_t signatureInfo);

# Parameter Description
1 signatureInfo The signature info object handle.
Returns

The time as Unix time in milliseconds, 64-bit integer. Negative in case of error.


GetSignatureIsTrusted

Gets whether the signature is trusted.

int32_t GetSignatureIsTrusted(intptr_t signature);

# Parameter Description
1 signature A signature object handle.
Returns

True(1) or false(0) in case of success.


GetSignatureIsValid

Gets whether the signature is valid.

int32_t GetSignatureIsValid(intptr_t signature);

# Parameter Description
1 signature A signature object handle.
Returns

True(1) or false(0) in case of success.

Remarks

See GetSignatureIsTrusted.


GetSignatureNotaryInfo

Gets the notary information.

intptr_t GetSignatureNotaryInfo(void);

Returns

The notary information as character string.


GetSignaturePublicNotaryKey

Gets the public notary key.

intptr_t GetSignaturePublicNotaryKey(void);

Returns

The public notary key as length-prefixed octets.


GetSignatureRtcTime

Gets the time from the RTC of the signature device.

int64_t GetSignatureRtcTime(void);

Returns

Unix time in milliseconds. Negative in case of error.


GetSignatureSignedCms

Gets the SignedCMS object from a signature object.

intptr_t GetSignatureSignedCms(intptr_t signature);

# Parameter Description
1 signature The signature object handle,
Returns

The SignedCMS object handle.


GetSignedAttributesBioBlocks

Gets the bioBlocks attribute of a signed attributes object.

intptr_t GetSignedAttributesBioBlocks(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The bioBlocks as a length-prefixed buffer. Null in case of absence or error.


GetSignedAttributesBioKey

Gets the bioKey of a signed attributes object.

intptr_t GetSignedAttributesBioKey(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns


GetSignedAttributesBioText

Gets the bioText attribute of a signed attributes object.

intptr_t GetSignedAttributesBioText(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The bioText as a character string. Null in case of absence or error.


GetSignedAttributesContentDigest

Gets the preliminaryHash (alias contentdigest) from a signed attributes object.

intptr_t GetSignedAttributesContentDigest(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns


GetSignedAttributesDeviceFirmwareVersion

Gets the firmwareVersion attribute of a signed attributes object.

intptr_t GetSignedAttributesDeviceFirmwareVersion(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The firmware version as a character string.


GetSignedAttributesDeviceName

Gets the deviceName attribute of a signed attributes object.

intptr_t GetSignedAttributesDeviceName(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The device name as a character string.


GetSignedAttributesDeviceSerialNumber

Gets the serialNumber attribute of a signed attributes object.

intptr_t GetSignedAttributesDeviceSerialNumber(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The device serial number as a character string.


GetSignedAttributesDeviceTime

Gets the deviceTime attribute of a signed attributes object.

int64_t GetSignedAttributesDeviceTime(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The device time as Unix time in milliseconds, 64-bit integer.


GetSignedAttributesDriverCertificate

Gets the driverCertificate attribute of a signed attributes object.

intptr_t GetSignedAttributesDriverCertificate(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The device certificate as a length-prefixed buffer.


GetSignedAttributesMessageDigestSha256

Gets the message digest from signed attributes.

intptr_t GetSignedAttributesMessageDigestSha256(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes.
Returns

The SHA256-digest as a buffer of 32 octets. Null in case of error.


GetSignedAttributesNotaryInfo

Gets the notaryInfo attribute of a signed attributes object.

intptr_t GetSignedAttributesNotaryInfo(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The notary info as character string.


GetSignedAttributesNotaryKey

Gets the notaryKey attribute of a signed attributes object.

intptr_t GetSignedAttributesNotaryKey(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The notary key as length-prefixed buffer.


GetSignedAttributesOf

Gets signed attributes from the given content digest.

intptr_t GetSignedAttributesOf(intptr_t contentDigest);

# Parameter Description
1 contentDigest The content digest as a length-prefixed buffer.
Returns

A signed attributes object handle.


GetSignedAttributesOf32

Gets signed attributes from the given content digest.

intptr_t GetSignedAttributesOf32(intptr_t contentDigest);

# Parameter Description
1 contentDigest The content digest as a buffer of 32 octets.
Returns

A signed attributes object handle.


GetSignedAttributesOpenState

Gets the openState attribute of a signed attributes object.

int32_t GetSignedAttributesOpenState(intptr_t signedAttributes);

# Parameter Description
1 signedAttributes The signed attributes object handle.
Returns

The open state.


GetSignedCmsFirstSignerInfo

Gets the first signer info of a SignedCms object.

intptr_t GetSignedCmsFirstSignerInfo(intptr_t signedCms);

# Parameter Description
1 signedCms The SignedCms object handle.
Returns

The signer info object. Null in case of error.


GetSignedCmsSha256

Gets a SignedCMS object.

intptr_t GetSignedCmsSha256(intptr_t x509Certificate, intptr_t signedAttributes, intptr_t lengthPrefixedRSASignature);

# Parameter Description
1 x509Certificate The signer certificate as a handle to an X509 certificate object.
2 signedAttributes The signed attribtutes handle.
3 lengthPrefixedRSASignature The RSA signature as length-prefixed buffer.
Returns

The SignedCMS object handle. Null in case of error.


GetSignedDocumentHash

Gets the signed document hash.

intptr_t GetSignedDocumentHash(void);

Returns

A length-prefixed buffer.

Remarks

The length prefix is a 32 bit integer.


GetSignedXml

Downloads the document.

intptr_t GetSignedXml(void);

Returns

The document as length-prefixed octets.


GetSignerInfoSignedAttributes

Gets the signed attributes object of a signer info object.

intptr_t GetSignerInfoSignedAttributes(intptr_t signerInfo);

# Parameter Description
1 signerInfo The signer info object handle.
Returns

The signed attributes object handle. Null in case of absence or error.


GetSignFinishedIsEnabled

Gets the SignFinishedEnabled flag.

int32_t GetSignFinishedIsEnabled(void);

Returns

Whether the SignFinished callback shall called (1) or not(0).


GetSignFinishedMillisecondsTimeout

Gets the duration after which the SignFinished callback is called.

int32_t GetSignFinishedMillisecondsTimeout(void);

Returns

The duration in milliseconds.


GetSignTimeoutMilliseconds

Gets the duration in milliseconds after which the SignHasTimedOut callback is called. Negative values deactivate the event. This is the default.

int32_t GetSignTimeoutMilliseconds(void);

Returns

0 in case of success.


GetTextAll

Gets all the text from all pages of the pdf

intptr_t GetTextAll(intptr_t textHandle);

# Parameter Description
1 textHandle
Returns

returns IntPtr to string


GetTextArgsDefault

By default, the whole document text is extracted without sorting by position.

intptr_t GetTextArgsDefault(void);

Returns

The default text args.


GetTextFieldDoNotScroll

Gets the DoNotScroll flag of a text field.

int32_t GetTextFieldDoNotScroll(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

True(1) or false(0) in case of success.


GetTextFieldDoNotSpellCheck

Gets the DoNotSpellCheck flag of a text field.

int32_t GetTextFieldDoNotSpellCheck(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

True(1) or false(0) in case of success.


GetTextFieldIsFileSelect

Gets the FileSelect flag of a text field.

int32_t GetTextFieldIsFileSelect(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

True(1) or false(0) in case of success.


GetTextFieldIsMultiLine

Gets the MultiLine flag of a text field.

int32_t GetTextFieldIsMultiLine(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

True(1) or false(0) in case of success.


GetTextFieldIsPassword

Gets the Password flag of a text field.

int32_t GetTextFieldIsPassword(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

True(1) or false(0) in case of success.


GetTextFieldMaxLen

Gets the maximum length of a text field.

int32_t GetTextFieldMaxLen(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

The length as the total number of characters in case of sucess or -1 if the value is not present.


GetTextFieldText

Gets the text of a text field.

intptr_t GetTextFieldText(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

The text as a character string.


GetTextFieldTextAppearance

Gets the text appearance of a text field.

intptr_t GetTextFieldTextAppearance(intptr_t fieldHandle);

# Parameter Description
1 fieldHandle The text field handle.
Returns

The text appearance handle. Null in case of error.

Remarks

See GetChoiceFieldTextAppearance.


GetTextInvalid

whether the Text is Invalid

int32_t GetTextInvalid(intptr_t text);

# Parameter Description
1 text
Returns

Zero means valid


GetTextPages

Yields a paginated view of the extracted text.

intptr_t GetTextPages(intptr_t textHandle);

# Parameter Description
1 textHandle
Returns


GetX509CertificateFromPkcs12AndPassword

Gets a X509 certificate object from a PKCS12 file and a password.

intptr_t GetX509CertificateFromPkcs12AndPassword(intptr_t lengthPrefixedPkcs12, intptr_t password);

# Parameter Description
1 lengthPrefixedPkcs12 The PKCS12 file as a length-prefixed buffer.
2 password The password as a character string.
Returns

A handle to a X509 certificate object. Null in case of error.


GetX509CertificateSignedHashSha256

Gets a RSA signature that results from signing a hash with an RSA key taken from a X509 certificate.

intptr_t GetX509CertificateSignedHashSha256(intptr_t x509Certificate, intptr_t lengthPrefixedHash);

# Parameter Description
1 x509Certificate The handle to the X509 certificate having a private RSA key.
2 lengthPrefixedHash The SHA256-hash as a length-prefixed buffer.
Returns

The signature as a length-prefixed buffer. Null in case of error.


LoadPdf

Loads a PDF document.

int32_t LoadPdf(intptr_t document);

# Parameter Description
1 document The document as length-prefixed octets.
Returns

0 in case of success.


PrepareSignatureSha256

Prepares the signing of a signature field.

int32_t PrepareSignatureSha256(intptr_t signatureField, intptr_t signatureInfo, intptr_t signatureImage, int32_t size);

# Parameter Description
1 signatureField The signature field handle.
2 signatureInfo The signature info object handle.
3 signatureImage The signature image as a length-prefixed buffer.
4 size The estimated size of the signature value.
Returns

0 in case of success.

Remarks

To get a signature info object, see GetSignatureInfoOf. The prefix of the image buffer is a 32-bit integer, similar to the return value of GetSignatureImageAsPNG.


Print

Prints a PDF document.

int32_t Print(intptr_t path);

# Parameter Description
1 path The path to the document on the file system. If null is given, the loaded document, if any, is used.
Returns

Zero in case of success.

Remarks

Depends on PDF service 5.0.5.


PrintWithArgs

Prints a PDF document.

int32_t PrintWithArgs(intptr_t printArgs);

# Parameter Description
1 printArgs The print arguments including the path to the document on the file system. If none is given, the loaded document, if any, is used.
Returns

Zero in case of success.

Remarks

Depends on PDF service 5.0.5.


RenameFileOnDevice

Renames a file stored on the signature device.

int32_t RenameFileOnDevice(intptr_t oldFileName, intptr_t newFileName);

# Parameter Description
1 oldFileName The old file name.
2 newFileName The new file name.
Returns


RenderPageAsPng

Renders a page.

intptr_t RenderPageAsPng(int32_t page);

# Parameter Description
1 page The page number.
Returns

A PNG image as length-prefixed octets.


RenderPageWithDpiAsPng

Renders a page with the given resolution.

intptr_t RenderPageWithDpiAsPng(int32_t page, int32_t dpi);

# Parameter Description
1 page The page number.
2 dpi The resolution as dots per inch. Recommended resolutions are: 72, 96, 150, 300.
Returns

A PNG image as length-prefixed octets.


ResetDevice

Resets all device options that are not persisted to the permanent storage of the device.

int32_t ResetDevice(void);

Returns

0 in case of success.


SDialogClearDisplay

Clears display buffers in the simple dialog mode.

int32_t SDialogClearDisplay(int32_t buffer);

# Parameter Description
1 buffer Which buffer to clear: The current buffer (1), the shadow buffer (2) or both (3).
Returns

0 in case of success.


SDialogSetFontFromPath

Sets the font to be used for writing text in the simple dialog mode.

int32_t SDialogSetFontFromPath(intptr_t path, int32_t loadOption);

# Parameter Description
1 path The path to the SOF file.
2 loadOption Whether to reuse a cached version of the image from the device storage (0) or to upload a new image (1).
Returns

0 in case of success.


SDialogSetImage

Sets an image to the selected image buffer at the desired location.

int32_t SDialogSetImage(intptr_t image, int32_t column, int32_t row, int32_t buffer);

# Parameter Description
1 image The length-prefixed image octets.
2 column The column of the upper left corner of the image.
3 row The row of the upper left corner of the image.
4 buffer The dispay buffer to write to: 0(shadow buffer), 1(current buffer).
Returns

0 in case of success.


SDialogSetImageFromPath

Sets an image to the desired location in the simple dialog mode.

int32_t SDialogSetImageFromPath(intptr_t path, int32_t column, int32_t row, int32_t buffer, int32_t loadOption);

# Parameter Description
1 path The path to the image file.
2 column The column of the upper left corner of the image.
3 row The row of the upper left corner of the image.
4 buffer The dispay buffer to write to: shadow buffer(0), current buffer(1).
5 loadOption Whether to reuse a cached version of the image from the device storage (0) or to upload a new image (1).
Returns

0 in case of success.


SDialogSetMode

Sets the signature device to simple dialog mode, if the device supports it.

int32_t SDialogSetMode(void);

Returns

0 in case of success.

Remarks

The simple dialog mode allows to run a customized graphical user interface on the device. The displayed graphics consist of text fields and images. User input is done is with the pen Pen events can be received through a callback. See SetPenCallback. To record a signature in the simple dialog mode call StartSignatureMode(14).


SDialogSetText

Writes a text field in the simple dialog mode.

int32_t SDialogSetText(intptr_t text, int32_t column, int32_t row, int32_t textColor, int32_t backgroundColor);

# Parameter Description
1 text The text to write.
2 column The column of the upper left corner of the text field.
3 row The row of the upper left corner of the text field.
4 textColor The foreground color of the text.
5 backgroundColor The background color of the text field
Returns

0 in case of success.


SDialogUpdateDisplay

Updates the dialog in simple dialog mode.

int32_t SDialogUpdateDisplay(int32_t copyBufferOption);

# Parameter Description
1 copyBufferOption Whether to overwrite the shadow buffer (1) or not (0).
Returns

0 in case of success.

Remarks

Apart from the visible buffer, the simple dialog mode also has a shadow buffer. This shadow buffer can be used to prepare several graphical elements and then render all of them in one step with an update. When the display is to be updated one can either overwrite the shadow buffer with the contents in the currently visible buffer or not. To be used in conjunction with SDialogSetImage, SDialogSetImageFromPath, SDialogSetText.


SetAdminKeyToUnlockDevice

Performing restricted operations with the device require it to be unnlocked with an adminKey.

int32_t SetAdminKeyToUnlockDevice(intptr_t adminKey);

# Parameter Description
1 adminKey The admin key as a character string.
Returns

0 in case of success.


SetBehaviourClick

Sets the behaviour object such that hardware signing is used.

int32_t SetBehaviourClick(intptr_t behaviour, int32_t buttonKind);

# Parameter Description
1 behaviour The behaviour object handle.
Returns

0 in case of success.

Remarks

Hardware signing means that the signature device shall perform the RSA signature.


SetBehaviourDoDigestAction

Sets a callback to call when the digest has been calculated.

int32_t SetBehaviourDoDigestAction(intptr_t behaviour, /* void( *)(intptr_t) */ intptr_t digestAction);

# Parameter Description
1 behaviour The behaviour object handle.
2 digestAction The callback with one parameter that is the digest as a length-prefixed buffer.
Returns

0 in case of success.

Remarks

This is intended for applications in which the user shall review the digest during the signing process.


SetBehaviourDoHardwareSign

Sets the behaviour object such that hardware signing is used.

int32_t SetBehaviourDoHardwareSign(intptr_t behaviour);

# Parameter Description
1 behaviour The behaviour object handle.
Returns

0 in case of success.

Remarks

Hardware signing means that the signature device shall perform the RSA signature.


SetBehaviourExternalSignatureImage

Sets a TSA adress of a behaviour object.

int32_t SetBehaviourExternalSignatureImage(intptr_t behaviour, intptr_t externalSignatureImage);

# Parameter Description
1 behaviour The behaviour object handle.
2 address The TSA adress as a character string.
Returns

0 in case of successs.

Remarks

When the resulting behaviour object is used in signing process, an attempt is made to get a trusted timestamping from the given time stamp authority (TSA). In case of success, that timestamp is put into the signature value of the signature field to be signed.


SetBehaviourSignInDocument

Sets a behaviour such that makes the signing process display the document on the device..

int32_t SetBehaviourSignInDocument(intptr_t behaviour, intptr_t docSignRectangle, int32_t crop);

# Parameter Description
1 behaviour The behaviour object handle.
2 docSignRectangle The docSignRectangle object handle.
3 crop Whether to crop. True(1, recommended) or false(0).
Returns

0 in case of success.

Remarks

A DocSignRectangle can be gotten from one of the GetDocSignRectangle functions. The DocSignRectangle defines the display area on the device that shall be used to record the signature. The section of the document page to be signed is cropped to the size of the available display area if 'crop' is true.


SetBehaviourStamp

Sets how to stamp.

int32_t SetBehaviourStamp(intptr_t behaviour, int32_t argb, intptr_t font, /* intptr_t( *)(intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, intptr_t, int64_t) */ intptr_t textBuilder);

# Parameter Description
1 behaviour The behaviour object.
2 argb The color as 32-bit ARGB integer.
3 font The font as a character string. Pass null to use the default font.
4 textBuilder A text builder callback or object handle. Pass null to use the default text builder.
Returns

0 in case of success.

Remarks

The text builder allows to adjust the stamp text. To get an adjusted default text builder, use GetDefaultTextBuilderOf. Pass a callback to use your own text builder. That callback takes 7 parameters. The first six are character strings: signedBy, signer, reasonForSigningIs, reason, locationAndDateIs, location. The seventh is signing time as Unix time in ms as 64-bit integer.

Examples
                
             // C99, The procedure addASignatureFieldAndSign 
             // signs a loaded document with a custom text builder and saves it to a file using the library instance mod.
             // The stamp text is green and shows all seven available entries.
            
             void saveLengthPrefixedOctetsToPath(const char* path, intptr_t* lpOctets) {
             	FILE* fp = fopen(path, "wb");
             	int32_t length = lpOctets[0];
             	char* octets = 4 + (char*)lpOctets;
             	fwrite(octets, 1, length, fp);
             	fclose(fp);
             }
            
             char* buffer = new char[1024];
             
             char* customTextBuilder(char* signedBy, char* signer, char* reasonForSigningIs, char* reason,
                 char* locationAndDateIs, char* location, int64_t unixTimeInMs)
             {
             	time_t epoch = unixTimeInMs / 1000;
             	char* dateTime = asctime(gmtime(&epoch));
             
             	sprintf(buffer, "%s: <b>%s</b><br>%s: <ul>%s</ul><br>%s: %s<br><i>%s</i>",
             		signedBy, signer, reasonForSigningIs, reason, locationAndDateIs, location, dateTime);
             
             	return buffer;
             }
             
             void addASignatureFieldAndSign(void* mod) {
             	int ret = LoadTheDocument(mod);
             
             	AddSignatureField_ft addSignatureField = (AddSignatureField_ft)get_export(mod, "AddSignatureField");
             	ret = addSignatureField("theNewSignatureField", 0, 0, 2 * 72, 3 * 72, 0);
             
             	intptr_t** lpFields = getAcroFormFields(mod);
                 // The function getFirstSignatureField is omitted. It uses GetFieldIsSignatureField.
             	intptr_t* signatureField = getFirstSignatureField(mod, lpFields);
             
             	Ptr_Ptr_ft getFieldName = (Ptr_Ptr_ft)get_export(mod, "GetFieldName");
             	char* theNameAgain = (char*)getFieldName(signatureField);
             	printf("The name of the field just added is %s\n", theNameAgain);
             
             	GetSignatureInfoOf_ft getSignatureInfoOf = (GetSignatureInfoOf_ft)get_export(mod, "GetSignatureInfoOf");
             	intptr_t* signatureInfo = getSignatureInfoOf("Albert", "Aus gutem Grund.", "Stuttgart", NULL);
             
             	Void_Ptr_ft getBehaviourDefault = (Void_Ptr_ft)get_export(mod, "GetBehaviourDefault");
             	intptr_t* behaviour = getBehaviourDefault();
             
             	SetBehaviourStamp_ft setBehaviourStamp = (SetBehaviourStamp_ft)get_export(mod, "SetBehaviourStamp");
             	ret = setBehaviourStamp(behaviour, 0xFFAAAA00, NULL, &customTextBuilder);
             
             	SignSignatureField_ft signSignatureField = (SignSignatureField_ft)get_export(mod, "SignSignatureField");
             	ret = signSignatureField(signatureField, signatureInfo, behaviour);
             
             	Void_Ptr_ft downloadPdf = (Void_Ptr_ft)get_export(mod, "DownloadPdf");
             	intptr_t* lengthPrefixedDocumentOctets = downloadPdf();
             	saveLengthPrefixedOctetsToPath("TheSignedDocument.pdf", lengthPrefixedDocumentOctets);
             
             	Free(mod, signatureInfo);
             	Free(mod, behaviour);
             	Free(mod, lengthPrefixedDocumentOctets);
             	Free(mod, lpFields);
             	Free(mod, theNameAgain);
             }
             
                                    

SetBehaviourUseRectangle

Sets which signature rectangle to be used in standard signature mode.

int32_t SetBehaviourUseRectangle(intptr_t behaviour, intptr_t SignRectangle);

# Parameter Description
1 left Signature rectangle starting from left of screen in mm.
2 top Signature rectangle starting from top of screen in mm.
3 width Signature rectangle width starting from "left" parameter in mm.
4 height Signature rectangle height starting from "top" parameter in mm.
Returns

0 in case of successs.


SetBehaviourUseTsa

Sets a TSA adress of a behaviour object.

int32_t SetBehaviourUseTsa(intptr_t behaviour, intptr_t address);

# Parameter Description
1 behaviour The behaviour object handle.
2 address The TSA adress as a character string.
Returns

0 in case of successs.

Remarks

When the resulting behaviour object is used in signing process, an attempt is made to get a trusted timestamping from the given time stamp authority (TSA). In case of success, that timestamp is put into the signature value of the signature field to be signed.


SetButtonCallback

Sets the callback to call when a button is clicked on the device.

int32_t SetButtonCallback(/* void( *)(intptr_t) */ intptr_t fptr);

# Parameter Description
1 fptr The callback.
Returns

0

Examples
                
            // C99
            struct buttonEvent {
                int32_t kind;
            };
            
            enum buttonkind {
                unknown,
                rotate,
                next,
                prev,
                ok,
                repeat,
                cancel,
                zoomIn,
                zoomOut,
                startSignature,
                rotate90
            };
            
                                    

SetButtonConfigColor

Sets the color of the button config.

int32_t SetButtonConfigColor(intptr_t buttonConfig, int32_t color);

# Parameter Description
1 buttonConfig The button config handle.
2 color The color as 32-bit ARGB integer.
Returns

0 in case of success.


SetButtonConfigEnabled

Sets the enabled flag of the button config.

int32_t SetButtonConfigEnabled(intptr_t buttonConfig, int32_t enabled);

# Parameter Description
1 buttonConfig The button config handle.
2 enabled Whether the button shall be enabled (1) or not (0).
Returns

0 in case of success.


SetButtonConfigs

Sets the button configuration.

int32_t SetButtonConfigs(intptr_t buttonConfigs, int32_t persist);

# Parameter Description
1 buttonConfigs The button configuration returned by GetButtonConfigs.
2 persist Whether the configuration shall be persisted to the device (1) or not (0).
Returns

0 in case of success.


SetButtonConfigVisible

Sets the visible flag of the button config.

int32_t SetButtonConfigVisible(intptr_t buttonConfig, int32_t visible);

# Parameter Description
1 buttonConfig The button config handle.
2 visible Whether the button shall be visible (1) or not (0).
Returns

0 in case of success.


SetCheckBoxIsChecked

Sets whether the check box is checked.

int32_t SetCheckBoxIsChecked(intptr_t fieldHandle, int32_t isChecked);

# Parameter Description
1 fieldHandle A check box field handle.
Returns

0 in case of success.


SetChoiceFieldSelection

Sets the choice field display values.

int32_t SetChoiceFieldSelection(intptr_t fieldHandle, intptr_t selection);

# Parameter Description
1 fieldHandle The choice field handle.
2 selection The selection as a length-prefixed array of character strings.
Returns

0 in case of success.


SetChoiceFieldSelectionN

Sets the choice field display values.

int32_t SetChoiceFieldSelectionN(intptr_t fieldHandle, intptr_t selection, int32_t length);

# Parameter Description
1 fieldHandle The choice field handle.
2 selection The selection as an array of character strings.
3 length The length of the selection array.
Returns

0 in case of success.


SetCommunicationType

Can set the communication type to TCP.

int32_t SetCommunicationType(int32_t comType, intptr_t address, int32_t port);

# Parameter Description
1 comType The communication type: TCP(1).
2 address The address.
3 port The port.
Returns

0 in case of success.

Remarks

This allows to control a signature device over TCP/IP. The signature device has to be connected to the remote computer with the given address. The remote computer requires dedicated software to share the signature device.


SetContinuousScrollCallback

Sets the callback to call when new tiles have to be sent to the device in the continuous scroll mode.

int32_t SetContinuousScrollCallback(/* void( *)(intptr_t) */ intptr_t fptr);

# Parameter Description
1 fptr The callback.
Returns

0

Remarks

A pointer to structured memory is passed to the callback.

Examples
                
            // C99
            struct scrollEvent {
                int32_t isPageNumber;
                int32_t number;
            };
            
                                    

SetContinuousScrollMode

Sets the device to the continuous scroll mode.

int32_t SetContinuousScrollMode(int32_t numberOfPages, int32_t numberOfTiles, int32_t startTileNumber, int32_t startTileOffset, intptr_t buttonText, int32_t tileWidth, int32_t tileHeight);

# Parameter Description
1 numberOfPages The number of pages of the document.
2 numberOfTiles The number of tiles the document is to be split up into.
3 startTileNumber This tile number is requested first.
4 startTileOffset Scrolls the first tile down.
5 buttonText The text inside the button.
6 tileWidth The width of a tile /pixels. Recommended width: 992.
7 tileHeight The height of a tile /pixels. Recommended height: 702.
Returns

0 in case of success.


SetContinuousScrollTile

Sets a continuous scroll tile.

int32_t SetContinuousScrollTile(intptr_t image, int32_t tileNumber, int32_t pageNumber, int32_t numberOfTiles);

# Parameter Description
1 image The image as length-prefixed octets.
2 tileNumber The tile number.
3 pageNumber The page number.
4 numberOfTiles The number of tiles.
Returns

0 in case of success.


SetContinuousScrollTileFromPath

Sets a continuous scroll tile.

int32_t SetContinuousScrollTileFromPath(intptr_t path, int32_t tileNumber, int32_t pageNumber, int32_t numberOfTiles);

# Parameter Description
1 path The path to an image as a character string.
2 tileNumber The tile number.
3 pageNumber The page number.
4 numberOfTiles The number of tiles.
Returns

0 in case of success.


SetContinuousScrollTileNumber

Sets the continuous scroll tile number in the continuous scroll mode.

int32_t SetContinuousScrollTileNumber(int32_t tileNumber, int32_t numberOfTiles, int32_t offset);

# Parameter Description
1 tileNumber The tile number.
2 numberOfTiles The maximum Tile number.
3 offset The offset
Returns

0 in case of success.


SetCustomerLogoMode

Sets the device to customer logo mode.

int32_t SetCustomerLogoMode(void);

Returns

0 in case of success.


SetDevice

Sets the device to control.

int32_t SetDevice(intptr_t deviceName);

# Parameter Description
1 deviceName The device name.
Returns

0 in case of success.

Remarks

Device names may be gotten through the function EnumerateDevices.


SetDeviceBrightness

Sets the device brightness.

int32_t SetDeviceBrightness(int32_t brightness);

# Parameter Description
1 brightness The brightness from 0 to 100.
Returns

0 in case of success.


SetDeviceCryptoId

Sets the cryptoId to use with the selected device.

int32_t SetDeviceCryptoId(intptr_t cryptoId);

# Parameter Description
1 cryptoId A handle to a crypto ID object. See GetDeviceAllCryptoIds.
Returns

0 in case of success.


SetDeviceDisplayOrientation

Sets the display orientation.

int32_t SetDeviceDisplayOrientation(int32_t orientation);

# Parameter Description
1 orientation The orientation: default(0), upside down(1), 90°(2), 270°(3).
Returns

0 in case of success.


SetDeviceTransPortProtocol

Sets the device Transport Protocol. Note : do not enter 1 as parameter

int32_t SetDeviceTransPortProtocol(int32_t protocol);

# Parameter Description
1 protocol protocol = 0 is usb, protocol = 2 is Vcom.
Returns

0 in case of success. and 1 incase of error


SetDisconnectCallback

Sets the callback to call when the selected device has been disconnected.

int32_t SetDisconnectCallback(/* void( *)(void) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0


SetDocSignRectangleBorderColor

Sets the border color of a DocSignRectangle object.

int32_t SetDocSignRectangleBorderColor(intptr_t docSignRectangle, int32_t color);

# Parameter Description
1 docSignRectangle The DocSignRectangle object handle.
2 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.

Remarks

The default border color is red.


SetDocSignRectangleBorderWidth

Sets the border width of a DocSignRectangle object.

int32_t SetDocSignRectangleBorderWidth(intptr_t docSignRectangle, int32_t width);

# Parameter Description
1 docSignRectangle The DocSignRectangle object handle.
2 width The width.
Returns

0 in case of success.

Remarks

The default border width is 2.


SetDocSignRectangleColor

Sets the color of a DocSignRectangle object.

int32_t SetDocSignRectangleColor(intptr_t docSignRectangle, int32_t color);

# Parameter Description
1 docSignRectangle The DocSignRectangle object handle.
2 color The color as a 32-bit ARGB integer.
Returns

0 in case of success.

Remarks

The default color is transparent.


SetDocumentViewing

Show an image with the device display.

int32_t SetDocumentViewing(intptr_t image, int32_t pageNumber, int32_t numberOfPages);

# Parameter Description
1 image The image as length-prefixed octets..
2 pageNumber The page number.
3 numberOfPages The number of pages.
Returns

0 in case of success.


SetDocumentViewingFromPath

Show an image with the device display.

int32_t SetDocumentViewingFromPath(intptr_t path, int32_t pageNumber, int32_t numberOfPages);

# Parameter Description
1 path The path to the image as a character string.
2 pageNumber The page number.
3 numberOfPages The number of pages.
Returns

0 in case of success.


SetDriverLicenseString

Sets the driver license.

int32_t SetDriverLicenseString(intptr_t license);

# Parameter Description
1 license The license text.
Returns

0 in case of success.


SetDriverXmlCertificate

Sets the driver XML certificate

int32_t SetDriverXmlCertificate(intptr_t path);

# Parameter Description
1 path The path to the driver XML certificate file.
Returns

0 in case of success.

Remarks

Without a valid license, a warning popup may appear when starting signature processes.


SetDriverXmlCertificateFromPath

Sets the driver XML certificate.

int32_t SetDriverXmlCertificateFromPath(intptr_t path);

# Parameter Description
1 path The path to the file as a character string.
Returns

0 in case of success.

Remarks

Setting a good certificate is mandatory on Linux, OSX. On windows, this prevents the popup window.


SetFieldReadOnly

Sets the ReadOnly flag of the field.

int32_t SetFieldReadOnly(intptr_t fieldHandle, int32_t readOnly);

# Parameter Description
1 fieldHandle The field handle.
2 readOnly True(1) or false(0).
Returns

0 in case of success.


SetFinalDocumentHash32

Sets the final document hash.

int32_t SetFinalDocumentHash32(intptr_t _32octets, int32_t swSign);

# Parameter Description
1 _32octets A pointer to a buffer of 32 octets.
2 swSign Pass a nonzero number if software signing shall be used.
Returns

0 in case of success


SetFinalDocumentHash32Async

Sets the final document hash.

int32_t SetFinalDocumentHash32Async(intptr_t _32octets, int32_t swSign, /* void( *)(intptr_t) */ intptr_t callback);

# Parameter Description
1 _32octets A pointer to a buffer of 32 octets.
2 swSign Pass a nonzero number if software signing shall be used.
3 callback The callback to call when the operation succeeds and can pass a result to the callback.
Returns

0 in case of success

Remarks

The cryptographic signature is done by the signature device provided the device supports it and a zero swSign argument is given. In that case, the operation may only end successfully when a button is clicked on the signature device. Then, the callback is called with the result. See SetFinalDocumentHash32Blocking.


SetFinalDocumentHash32Blocking

Sets the final document hash. This is a blocking version of SetFinalDocumentHash32Async.

intptr_t SetFinalDocumentHash32Blocking(intptr_t _32octets, int32_t swSign);

# Parameter Description
1 _32octets A pointer to a buffer of 32 octets.
2 swSign Pass a nonzero number if software signing shall be used.
Returns

The result as structured memory in case of success.

Examples
                
            // C99
            struct setFinalDocHashResult {
                int32_t error;
                int32_t buttonClicked;
                int32_t buttonKind;
            };
            
                                    

SetKeyForRealTimeDecryptionFromPemPath

Sets the private RSA key to be used for for the decryption of the biometrical data being recorded by the signature device from a PEM file.

int32_t SetKeyForRealTimeDecryptionFromPemPath(intptr_t pemPath);

# Parameter Description
1 pemPath The path to the PEM file.
Returns

0 in case of success.

Remarks

The kind of files that can be parsed with this are text files that start with lines like -----BEGIN RSA PRIVATE KEY----- and -----BEGIN PRIVATE KEY----- if it contains a private RSA key.


SetLanguage

Sets the language of the device search window.

int32_t SetLanguage(int32_t language);

# Parameter Description
1 language A language code.
Returns

0

Remarks

The codes are 0 -> English, 1 -> French, 2 -> German, 3 -> Spanish, 4 -> Italian, 5 -> Russian.


SetLanguageFromString

Sets the language of the device search Window.

int32_t SetLanguageFromString(intptr_t language);

# Parameter Description
1 language The name of the language as a character string.
Returns

0

Remarks

Available languages are "English", "French", "German", "Spanish", "Italian", "Russian".


SetLicense

Sets the verified string. May run the license app.

int32_t SetLicense(intptr_t verifiedString);

# Parameter Description
1 verifiedString The verifice d
Returns


SetPalette

It is used to switch palette for G15 DuraSignMobile pad

int32_t SetPalette(int32_t buffer, int32_t startLineNo, int32_t endLineNo, int32_t xStartPosPalette0, int32_t xStartPosPalette1);

# Parameter Description
1 buffer Selects the buffer in which to switch palette.
2 startLineNo The Line no (y axis) in pixel where palette switch is started.
3 endLineNo The Line no (y axis) in pixel where palette switch is ended.
4 xStartPosPalette0 The pixel pos in x axis where palette0 switch is started.
5 xStartPosPalette1 The pixel pos in x axis where palette1 switch is started.
Returns

0 in case of success.

Remarks

Note 1 : This Api is applicable only for g15 or DuraSignMobile pad Note 2 : SelectBuf.Both is also applicable only to g15 or DuraSignPad


SetPenCallback

Sets the callback to call when the pen is used in the "simple dialog mode".

int32_t SetPenCallback(/* void( *)(intptr_t) */ intptr_t fptr);

# Parameter Description
1 fptr The callback.
Returns

0

Remarks

The parameter of the callback is the adress to a structure holding three 32 bit integers: x, y, type.


SetPreliminaryDocumentHash32

Sets the preliminary document hash.

int32_t SetPreliminaryDocumentHash32(intptr_t _32octets);

# Parameter Description
1 _32octets A pointer to a buffer having 32 octets.
Returns

0 in case of success.


SetPrintArgsDocPath

Allows to print a document from the file system.

int32_t SetPrintArgsDocPath(intptr_t printArgsHandle, intptr_t path);

# Parameter Description
1 printArgsHandle Handle obtained from GetPrintArgsDefault()
2 path The path to the document.
Returns

Changed print args.


SetPrintArgsPrintService

Select another print service.

int32_t SetPrintArgsPrintService(intptr_t printArgsHandle, intptr_t service);

# Parameter Description
1 printArgsHandle Handle obtained from GetPrintArgsDefault()
2 service Name of the Printer Service
Returns

Changed print args.


SetPrintArgsWithoutDialog

Omit the dialog.

int32_t SetPrintArgsWithoutDialog(intptr_t printArgsHandle);

# Parameter Description
1 printArgsHandle Handle obtained from GetPrintArgsDefault()
Returns

Changed print args.


SetPromoScreenFromPath

Sets promoscreen, that is, an image to be shown in customer logo mode.

int32_t SetPromoScreenFromPath(intptr_t path, int32_t number, int32_t orientation, int32_t screenTime);

# Parameter Description
1 path The path to the image file.
2 number The number between 1 and 10.
3 orientation The orientation: default(0), upside down(1), 90°(2), 270°(3).
4 screenTime How long this screen shall be displayed in s.
Returns


SetRadioButtonSelection

Sets the radio button selection.

int32_t SetRadioButtonSelection(intptr_t fieldHandle, intptr_t lengthPrefixedStringArray);

# Parameter Description
1 fieldHandle The radio button field handle.
2 lengthPrefixedStringArray The selection as length-prefixed character string array.
Returns

0 in case of success.


SetRadioButtonSelectionN

Sets the radio button selection.

int32_t SetRadioButtonSelectionN(intptr_t fieldHandle, intptr_t selection, int32_t length);

# Parameter Description
1 fieldHandle The radio button field handle.
2 selection The selection as a character string array.
3 length The length of the selection array.
Returns

0 in case of success.


SetSignatureFieldSignedCms

Sets the signature value of a signature field..

int32_t SetSignatureFieldSignedCms(intptr_t signatureField, intptr_t signedCms);

# Parameter Description
1 signatureField The signature field handle.
2 signedCms The SignedCMS handle.
Returns

0 in case of success.

Remarks

To get a SignedCMS handle, see GetSignedCmsSha256.


SetSignatureImageAlignment

Sets the alignment to use when the KeepAspectRatio resize option is set.

int32_t SetSignatureImageAlignment(int32_t alignment);

# Parameter Description
1 alignment The alignment: default(0), left(1), right(2), top(4), bottom(8), centered(16).
Returns

0 in case of success.

Remarks

Resize options may be set with SetSignatureImageResizeOption. A top-left alignment can be achieved with 5 = 4 | 1.


SetSignatureImageBackgroundColor

Sets the background color of the signature image.

int32_t SetSignatureImageBackgroundColor(int32_t backgroundColor);

# Parameter Description
1 backgroundColor The background color as a 32-bit ARGB integer.
Returns

0 in case of success.


SetSignatureImageLineColor

Sets the color of the signature line.

int32_t SetSignatureImageLineColor(int32_t lineColor);

# Parameter Description
1 lineColor The color as a 32-bit ARGB integer.
Returns

0 in case of success.


SetSignatureImageLineWidth

Sets the line width of the signature line.

int32_t SetSignatureImageLineWidth(double lineWidth);

# Parameter Description
1 lineWidth The width.
Returns

0 in case of success.

Examples
                
            // C99
            double thinner = 0.9 * GetSignatureImageLineWidth();
            SetSignatureImageLineWidth(thinner);
            
                                    

SetSignatureImageResizeOption

Changes how the signature image is to be resized.

int32_t SetSignatureImageResizeOption(int32_t resizeOption);

# Parameter Description
1 resizeOption The resize options: default(0), crop(1), stretch(2), keepAspectRatio(4), embedIntoSignBackground(8).
Returns

0 in case of success.

Remarks

Crop may be combined with stretch (3 = 2 | 1) and keepAspectRatio ( 5 = 4 | 1).


SetSignatureRectangle

Sets the signature rectangle.

int32_t SetSignatureRectangle(int32_t left, int32_t top, int32_t width, int32_t height);

# Parameter Description
1 left The left margin /pixel.
2 top The upper margin /pixel
3 width The width /pixel.
4 height The height /pixel.
Returns

0 in case of success.


SetSignatureRectangleAndScrolling

Advanced signature rectangle setter intended for document signing mode.

int32_t SetSignatureRectangleAndScrolling(int32_t left, int32_t top, int32_t width, int32_t height, int32_t scrollColumn, int32_t scrollRow, int32_t scrollOption, int32_t scrollCorrect);

# Parameter Description
1 left The column of the left edge of the rectangle /pixel.
2 top The row of the upper edge of the rectangle /pixel.
3 width The width of the rectangle /pixel.
4 height The height of the rectangle /pixel.
5 scrollColumn Scrolls the left edge of the signature rectangle together with the background image to the given column /pixel.
6 scrollRow Scrolls the lower edge of the signature rectangle together with the background image to the given row/pixel.
7 scrollOption One can switch off the scrolling for both dimensions with this option.
8 scrollCorrect For DocSign. Corrects the scroll position of the set signature retcangle.
Returns


SetSignatureRectangleStandard

Sets the standard signature rectangle, if any.

int32_t SetSignatureRectangleStandard(void);

Returns

0 in case of success.


SetSignatureRectangleWindow

Sets the signature rectangle and attaches it to a window.

int32_t SetSignatureRectangleWindow(int32_t left, int32_t top, int32_t width, int32_t height, intptr_t windowHandle);

# Parameter Description
1 left The left margin /pixel.
2 top The upper margin /pixel
3 width The width /pixel.
4 height The height /pixel.
5 windowHandle The window handle.
Returns

0 in case of success.


SetSignBackground

Sets the image to use as signing background.

int32_t SetSignBackground(intptr_t image);

# Parameter Description
1 image The image as length-prefixed octets.
Returns

0 in case of success.


SetSignBackgroundAndPageNumber

Sets the image to use as signing background and the page number text.

int32_t SetSignBackgroundAndPageNumber(intptr_t image, int32_t page, int32_t numberOfPages);

# Parameter Description
1 image The image as length-prefixed octets.
2 page The page numbers.
3 numberOfPages The number of pages.
Returns

0 in case of success.

Remarks

Some devices will display the page number as in the form "page/totalNumberOfPages".


SetSignBackgroundFromPath

Sets the image to use as signing background.

int32_t SetSignBackgroundFromPath(intptr_t path);

# Parameter Description
1 path The path to the image as a character string.
Returns

0 in case of success.


SetSignCertFromPkcs12Path

Sets a signing key that is gotten from a PKCS12 file.

int32_t SetSignCertFromPkcs12Path(intptr_t p12Path, intptr_t password);

# Parameter Description
1 p12Path The path to the file as a character string.
2 password
Returns

0 in case of success.

Remarks

Common file name endings of PKCS12 files are: P12, PFX.


SetSignCertFromStore

Sets a signing key that is gotten from the local certificate store.

int32_t SetSignCertFromStore(intptr_t commonName);

# Parameter Description
1 commonName The common name of the certificate as a character string.
Returns

0 in case of success.


SetSignCertToDefault

Resets the default signing behaviour.

int32_t SetSignCertToDefault(void);

Returns

0 in case of success.


SetSignedAttributesBioBlocks

Sets the bioBlocks attribute of a signed attributes object.

int32_t SetSignedAttributesBioBlocks(intptr_t signedAttributes, intptr_t preliminaryHash, intptr_t bioKey, intptr_t bioBlocks);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 bioKey The bioKey as a length-prefixed buffer.
3 bioBlocks The bioBlocks as a length-prefixed buffer.
Returns

0 in case of success.


SetSignedAttributesBioText

Sets the bioKey attribute and the bioText attribute of a signed attributes object.

int32_t SetSignedAttributesBioText(intptr_t signedAttributes, intptr_t preliminaryHash, intptr_t bioKey, intptr_t bioText);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 preliminaryHash The preliminaryHash as a length-prefixed buffer.
3 bioKey The bioKey as a length-prefixed buffer.
4 bioText The bioText as a character string.
Returns

0 in case of success.


SetSignedAttributesDeviceFirmwareVersion

Sets the firmwareVersion attribute of a signed attributes object.

int32_t SetSignedAttributesDeviceFirmwareVersion(intptr_t signedAttributes, intptr_t firmwareVersion);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 firmwareVersion The firmware version as a character string.
Returns

0 in case of success.


SetSignedAttributesDeviceName

Sets the deviceName attribute of a signed attributes object.

int32_t SetSignedAttributesDeviceName(intptr_t signedAttributes, intptr_t deviceName);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 deviceName The device name as a character string.
Returns

0 in case of success.


SetSignedAttributesDeviceSerialNumber

Sets the serialNumber attribute of a signed attributes object.

int32_t SetSignedAttributesDeviceSerialNumber(intptr_t signedAttributes, intptr_t serialNumber);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 serialNumber The device name as a character string.
Returns

0 in case of success.


SetSignedAttributesDeviceTime

Sets the deviceTime attribute of a signed attributes object.

int32_t SetSignedAttributesDeviceTime(intptr_t signedAttributes, int64_t unixTimeInMilliseconds);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 unixTimeInMilliseconds The device time as Unix time in milliseconds, 64-bit integer.
Returns

0 in case of success.


SetSignedAttributesDriverCertificate

Sets the driverCertificate attribute of a signed attributes object.

int32_t SetSignedAttributesDriverCertificate(intptr_t signedAttributes, intptr_t driverCertificate);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 driverCertificate The device certificate as a length-prefixed buffer.
Returns

0 in case of success.


SetSignedAttributesNotaryInfo

Sets the notaryInfo attribute of a signed attributes object.

int32_t SetSignedAttributesNotaryInfo(intptr_t signedAttributes, intptr_t notaryInfo);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 notaryInfo The notary info as character string.
Returns

0 in case of success.


SetSignedAttributesNotaryKey

Sets the notaryKey attribute of a signed attributes object.

int32_t SetSignedAttributesNotaryKey(intptr_t signedAttributes, intptr_t notaryKey);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 notaryKey The notary key as length-prefixed buffer.
Returns

0 in case of success.


SetSignedAttributesOpenState

Sets the openState attribute of a signed attributes object.

int32_t SetSignedAttributesOpenState(intptr_t signedAttributes, int32_t openState);

# Parameter Description
1 signedAttributes The signed attributes object handle.
2 openState The open state.
Returns

0 in case of success.


SetSignFinishedCallback

Sets the callback to call when a signature capturing stopped.

int32_t SetSignFinishedCallback(/* void( *)(void) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0


SetSignFinishedIsEnabled

Sets the SignFinishedEnabled flag.

int32_t SetSignFinishedIsEnabled(int32_t enabled);

# Parameter Description
1 enabled Whether the SignFinished callback shall called (1) or not(0).
Returns

0 in case of success.


SetSignFinishedMillisecondsTimeout

Sets the duration in milliseconds after which the SignFinished callback is called.

int32_t SetSignFinishedMillisecondsTimeout(int32_t duration);

# Parameter Description
1 duration The duration in milliseconds.
Returns

0 in case of success.


SetSignHasTimedOutCallback

Sets the callback to call when the signer does not start to draw for a certain timespan. The timespan is infinite by default.

int32_t SetSignHasTimedOutCallback(/* void( *)(void) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0


SetSignImageChangedCallback

Sets the callback to call when the signature image has changed.

int32_t SetSignImageChangedCallback(/* void( *)(void) */ intptr_t fptr);

# Parameter Description
1 fptr The callback.
Returns

0


SetSignImageChangedMillisecondsThrottle

Allows to throttle the invocations of the SignImageChanged callback.

int32_t SetSignImageChangedMillisecondsThrottle(int32_t interval);

# Parameter Description
1 interval The interval in milliseconds
Returns

1 in case of success


SetSigningUpdateCallback

Sets a callback to call when a dialog button is pressed.

int32_t SetSigningUpdateCallback(/* void( *)(intptr_t) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0

Remarks

The callback is called with one argument that is structured memory. The argument contains the name of the scene, the name of the dialog component that was clicked, the type of that component and the dialog page number. Component types are NoComponent(0), Button(2), CheckBox(4).

Examples
                
            // C99, the type of the dialog callback parameter
            struct dialogArgs {
                char* SceneName;
                char* ComponentName;
                int32_t ComponentType;
                int32_t PageNumber;
                 siginingUpdateCallback
            }
            
                                    

SetSignKeyFromPemPath

Sets a signing key that is gotten from a PEM file.

int32_t SetSignKeyFromPemPath(intptr_t pemPath);

# Parameter Description
1 pemPath
Returns

0 in case of success.


SetSignStartedCallback

Sets the callback to call when the signer starts to draw a signature.

int32_t SetSignStartedCallback(/* void( *)(void) */ intptr_t callback);

# Parameter Description
1 callback The callback.
Returns

0


SetSignText

For devices with black and white display: Renders the given text as a background image in the signature mode.

int32_t SetSignText(intptr_t text, int32_t fontSize);

# Parameter Description
1 text The text.
2 fontSize The fontsize.
Returns

0 in case of success.

Remarks

For devices with black and white display. This function overwrites the background image set through SetSignBackground.


SetSignTimeoutMilliseconds

Sets the duration in milliseconds after which the SignHasTimedOut callback is called. Negative values deactivate the event. This is the default.

int32_t SetSignTimeoutMilliseconds(int32_t duration);

# Parameter Description
1 duration The duration in milliseconds.
Returns

0 in case of success.


SetTextArgsEnd

Sets the page where to inclusively end the text extraction. Positive numbers including zero are offsets to the first page. Negative numbers are offsets to an imaginary page after the last document page.

int32_t SetTextArgsEnd(intptr_t textArgsHandle, int32_t endPage);

# Parameter Description
1 textArgsHandle Handle obtained from GetTextArgsDefault()
2 endPage End Page No
Returns

returns 1 when successful


SetTextArgsSortByPosition

The order of text tokens in a PDF file may differ from the visual position on the screen or on paper.

int32_t SetTextArgsSortByPosition(intptr_t textArgsHandle);

# Parameter Description
1 textArgsHandle Handle obtained from GetTextArgsDefault()
Returns

returns 1 when successful


SetTextArgsStart

Sets the page where to start the text extraction. Positive numbers including zero are offsets to the first page. Negative numbers are offsets to an imaginary page after the last document page.

int32_t SetTextArgsStart(intptr_t textArgsHandle, int32_t startPage);

# Parameter Description
1 textArgsHandle Handle obtained from GetTextArgsDefault()
2 startPage Start Page no
Returns

returns 1 when successful


SetTextFieldText

Gets the text of a text field.

int32_t SetTextFieldText(intptr_t fieldHandle, intptr_t text);

# Parameter Description
1 fieldHandle The text field handle.
2 text The text as a character string.
Returns

0 in case of success.


SignSignatureField

Performs a signing process with the chosen signature field.

int32_t SignSignatureField(intptr_t signatureField, intptr_t signatureInfo, intptr_t behaviour);

# Parameter Description
1 signatureField The signature field handle.
2 signatureInfo The signature info handle. Pass null to omit it.
3 behaviour The behaviour handle. Pass null to use the default.
Returns

0 in case of success.

Remarks

The optional signatureInfo allows passing entries for the signature field dictionary. A signer info object can be gotten through GetSignatureInfoOf. Some of the signer infos might be used for the stamp, if used. Whether a stamp shall be used can be controlled through the optional behaviour parameter among other things. See GetBehaviourDefault and the SetBehaviour* functions.


StartSignatureMode

Starts a signature mode.

int32_t StartSignatureMode(int32_t signMode);

# Parameter Description
1 signMode The sign mode: standard(0), docSign(6), simpleDialog(14).
Returns

0 in case of success


StartXmlSigning

Starts signing a pdf which is contained inside a xml and also other signature info Fields

int32_t StartXmlSigning(intptr_t xmlDoc);

# Parameter Description
1 xmlDoc the path to the xml document
Returns

0 in case of success


StopSignatureCapture

Stops the signature capture.

int32_t StopSignatureCapture(void);

Returns

0 in case of success.


Subtract

For testing. Subtracts b from a and returns the result.

int32_t Subtract(int32_t a, int32_t b);

# Parameter Description
1 a a
2 b b
Returns

a - b


TerminateService

For testing.

int32_t TerminateService(void);

Returns

0 in case of success.


UpdatePaletteColors

It is used to switch palette for G15 DuraSignMobile pad

int32_t UpdatePaletteColors(int32_t buffer, intptr_t _12octets);

# Parameter Description
1 buffer Selects the buffer in which to switch palette.
2 startLineNo The Line no (y axis) in pixel where palette switch is started.
3 endLineNo The Line no (y axis) in pixel where palette switch is ended.
4 xStartPosPalette0 The pixel pos in x axis where palette0 switch is started.
5 xStartPosPalette1 The pixel pos in x axis where palette1 switch is started.
Returns

0 in case of success.

Remarks

Note 1 : This Api is applicable only for g15 or DuraSignMobile pad Note 2 : SelectBuf.Both is also applicable only to g15 or DuraSignPad


ViewDocument

Displays a document on the device.

int32_t ViewDocument(int32_t pageNumber, int32_t zoomLevel, int32_t startSignatureButtonEnabled);

# Parameter Description
1 pageNumber The page number.
2 zoomLevel The desired zoom level: FitPage(0), FitHeight(1), FitWidth(2), Maximum(3).
3 startSignatureButtonEnabled Whether the start signature button shall be enabled or disabled.
Returns

0 in case of success.