Sei sulla pagina 1di 14

IntegriSign Standard Product + SDK

Developer’s Guide

Copyright 2009 IntegriSign


Table Of Contents
1. Introduction ...................................................................................................................... 3
2. Core Component (esCore.dll ) ................................................................................. 3
2.1 Properties ........................................................................................... 3
2.1.1 HashType............................................................................................................................... 3
2.1.2 HashData ............................................................................................................................... 4
2.2 Events ................................................................................................. 4
2.3 Signing Methods/Functions ................................................................ 4
2.3.1 StartSign................................................................................................................................ 4
2.3.2 GetSignData ......................................................................................................................... 5
2.3.3 OpenSign ............................................................................................................................... 5
2.3.4 VerifyDocument .................................................................................................................. 5
2.3.5 ShowDetails .......................................................................................................................... 6
2.3.6 ClearSign ............................................................................................................................... 6
2.3.7 SaveToFile ............................................................................................................................. 6
2.3.8 SetSignerDetailsEx ............................................................................................................ 7
2.3.9 GetSignerDetailsEx ............................................................................................................ 7
2.3.10 SetSignPreferencesEx .................................................................................................... 8
2.3.11 SetSignAppearanceOptionsEx ..................................................................................... 8
2.3.12 GetSignAppearanceOptionsEx..................................................................................... 9
2.3.13 SetSignerDetails............................................................................................................... 9
2.3.14 GetSignerDetails ............................................................................................................ 10
2.3.15 SetSignAppearanceOptions........................................................................................ 10
2.3.16 GetSignAppearanceOptions ....................................................................................... 11
2.3.17 SetSignPreferences ....................................................................................................... 12
2.3.18 SetAffirmationText ........................................................................................................ 12
2.3.19 GetImageData................................................................................................................. 13
2.3.20 GetImageBytes ............................................................................................................... 13
3. esSignPDF Component (esSignPDF.dll) .......................................................... 14
3.1 Methods ............................................................................................ 14
3.1.1 SignPDF................................................................................................................................ 14

Copyright 2009 IntegriSign


1. Introduction

Thank you for choosing IntegriSign, the most comprehensive signature


software in the market. IntegriSign gives you the features and functionality to
Sign and Secure electronic documents/e-mails/forms of any COM compatible
application, using powerful authentication tools. Electronic signature capture
is done through ePad device.

2. Core Component (esCore.dll )

IntegriSign Standard Product + SDK methods, properties and events are


exposed as part of IntegriSign ActiveX Component (esCore.dll). For an
application to use IntegriSign SDK methods, the application needs to refer
esCore.dll available in the IntegriSign Desktop Installation directory.

Following are the properties, methods and events that can be used to enable
an application with IntegriSign Capture functionality.

2.1 Properties

2.1.1 HashType

Description

This property has to be set depending on the type of hashing that needs to be
carried out in the host application.

Values

0 - Standard - Hashing is done using standard built-in IntegriSign Hash


utility.

1 - Custom – To perform custom hashing i.e. only selected fields in an


application are to be authenticated.

2 - None – No content hashing to be implemented in the host application.

Copyright 2009 IntegriSign


2.1.2 HashData

Description

This property has to be set with the data that has to be authenticated. These
values are taken from the present container viz. a form or document. To
implement the custom content integrity functionality this property has to be
set before the signature capturing process. This should also be set wherever
you need to check the authenticity of the content. Typically this should be
called before using the following methods.

1 StartSign
2 OpenSign
3 VerifyDocument

Note: This property is effective only when the HashType property is set to
Custom (1).

2.2 Events

The developer may handle/override the following events from


IntegriSign Component.

DblClick
MouseDown
MouseMove
MouseUp

2.3 Signing Methods/Functions

2.3.1 StartSign

Description

Invokes Signature capture Dialog and user can start the “act of signing”.
Requires ePad device.

Parameters

No input parameters

Return Value
Return value is nothing.

Copyright 2009 IntegriSign


2.3.2 GetSignData

Description

This function returns the signature data in an encrypted Base64string Format.


If not signed, it returns a null string.

Parameters

This takes no inputs.

Return Value

Signature data in encrypted Base64String format.

2.3.3 OpenSign

Description

Use this function to open and view the signature from the encrypted
Base64String on the signature component.

Parameters

StrData – An IntegriSign signature string of encrypted Base64String Format.

Return Value

This function returns nothing.

Note: Method GetSignData was used originally to generate encrypted


base64string from the signature component.

2.3.4 VerifyDocument

Description

Performs the hashing operation and returns the content integrity status. If the
HashType was set to Custom then HashData property must be set with the
original content before calling this method.

Parameters

This takes no inputs.

Return Value

0 – Hashed content has not changed since signing.

1 – Hashed content was modified after signing.


2 – Hashing was not implemented.

Copyright 2009 IntegriSign


2.3.5 ShowDetails

Description

This method displays a window containing signature and signer details.

Parameters
No input parameters.

2.3.6 ClearSign

Description

Clears the current signature and all the associated data with it.

Parameters
No input parameters.

2.3.7 SaveToFile

Description

Saves the signature as an image file (bmp, jpeg) in the set location.

Parameters

FileName – Data type String - Complete file Path where the bmp image is to
be saved.

FileType - Data type FILETYPE – Indicates type of file (image) storage.

(BMP = 0, JPEG =1)

nHeight – Data type Integer - Height of the bmp image in pixels.

nWidth – Data type Integer - Width of the bmp image in pixels.

ImageQuality – Data type Integer – For image quality (jpeg). An Optional

parameter.

Note: ImageQuality should be between 0 and 100. If the parameter is not set or is set to zero
ImageQuality is taken as 80 by default. NHeight, nWidth and Imagequality are optional
parameters. If not supplied, default values are taken.

Return Value
This returns nothing.

Copyright 2009 IntegriSign


2.3.8 SetSignerDetailsEx

Description

The Signer details like Name, Organization etc. can be set using this method.
This information is set so that it can be used as signer reference. This
method, if implemented, should be called before the StartSign method to
define ‘who’ is signing.

Parameters

Name (In) – Data type String - Name of the signer

OrgUnit (In) – Data type String - Organization unit of the signer

OrgName (In) – Data type String - Organization name of the signer

City (In) – Data type String - Location of the signer

State (In) – Data type String – State

Country (In) – Data type String - Country of the signer

eMail (In) – Data type String – Signer eMail address

SignLocation (In) – Data type String - Location from where the signer is
signing.

Return Value

0 – Signer information has been set successfully.

1 or 2 – Signer Name has been set as NULL.

2.3.9 GetSignerDetailsEx

Description

This method returns the Signer details stored in the signature component.

Parameters

Name (In/Out) – Data type String - Name of the signer

OrgUnit (In/Out) – Data type String - Organization unit of the signer

OrgName (In/Out) – Data type String - Organization name of the signer

City (In/Out) – Data type String - Location of the signer

State (In/Out) – Data type String – State

Country (In/Out) – Data type String - Country of the signer

Copyright 2009 IntegriSign


eMail (In/Out) – Data type String – Signer eMail address

SignLocation (In/Out) – Data type String - Location from where the signer is
signing.

Return Value

Returns values are set through the parameters in the above order.

2.3.10 SetSignPreferencesEx

Description

This function lets you specify whether the Location field is mandatory. You
can also specify whether the location field to be locked during the act of
signing.

Parameters

LocationRequired (In) – Data type Integer

LockLocationFld (In) – Data type String

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

2.3.11 SetSignAppearanceOptionsEx

Description

This function lets you specify the information to be displayed and printed
along with the signature.

Parameters

PenColor (In) – Data type Long

ShowName (In) – Data type Integer

ShowDate (In) – Data type Integer

ShowLogo (In) – Data type Integer

ShowLocation (In) – Data type Integer

ShowLabels (In) – Data type Integer

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

Copyright 2009 IntegriSign


2.3.12 GetSignAppearanceOptionsEx

Description

This function gets you the information that was displayed and printed along
with the signature.

Parameters

Date (In) – Data type Integer

Location (In) – Data type Integer

Logo (In) – Data type Integer

Name (In) – Data type Integer

Labels (In) – Data type Integer

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

2.3.13 SetSignerDetails

Description

The Signer details like Name, Organization etc. can be set using this method.
This information is set so that it can be used as signer reference. This
method, if implemented, should be called before the StartSign method to
define ‘who’ is signing.

Parameters

Name (In) – Data type String - Name of the signer

OrgUnit (In) – Data type String - Organization unit of the signer

OrgName (In) – Data type String - Organization name of the signer

City (In) – Data type String - Location of the signer

State (In) – Data type String – State

Country (In) – Data type String - Country of the signer

eMail (In) – Data type String – Signer eMail address

SignLocation (In) – Data type String - Location from where the signer is
signing.

bReserved(In) – Data type String - reserved parameter.

Copyright 2009 IntegriSign


Note: All the Parameters can take NULL values.

Return Value

This function returns nothing.

NOTE: It is recommended to use the SetSignerDetailsEx method


instead of the SetSignerDetails method. SetSignerDetails method is
maintained to support legacy applications.

2.3.14 GetSignerDetails

Description

This method returns the Signer details stored in the signature component.

Parameters

Name (In/Out) – Data type String - Name of the signer

OrgUnit (In/Out) – Data type String - Organization unit of the signer

OrgName (In/Out) – Data type String - Organization name of the signer

City (In/Out) – Data type String - Location of the signer

State (In/Out) – Data type String – State

Country (In/Out) – Data type String - Country of the signer

eMail (In/Out) – Data type String – Signer eMail address

SignLocation (In/Out) – Data type String - Location from where the signer is
signing.

bReserved (In/Out) – Data type String – reserved parameter.

Note: All the Parameters can take NULL values.

NOTE: It is recommended to use the GetSignerDetailsEx method


instead of the GetSignerDetails method. GetSignerDetails method is
maintained to support legacy applications.

2.3.15 SetSignAppearanceOptions

Description

This function lets you specify the information to be displayed and printed
along with the signature.

Parameters

PenColor (In) – Data type Long

ShowName (In) – Data type Integer

Copyright 2009 IntegriSign


ShowDate (In) – Data type Integer

ShowLogo (In) – Data type Integer

sReserved (In) – Data type Integer. A reserved parameter.

ShowLocation (In) – Data type Integer

ShowLabels (In) – Data type Integer

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

NOTE: It is recommended to use the SetSignAppearanceOptionsEx


method instead of the SetSignAppearanceOptions method.
SetSignAppearanceOptions method is maintained to support legacy
applications.

2.3.16 GetSignAppearanceOptions

Description

This function gets you the information that was selected to be displayed and
printed along with the signature.

Parameters

ShowName (In) – Data type Integer

ShowDate (In) – Data type Integer

ShowLogo (In) – Data type Integer

sReserved (In) – Data type Integer. A reserved parameter.

ShowLocation (In) – Data type Integer

ShowLabels (In) – Data type Integer

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

NOTE: It is recommended to use the GetSignAppearanceOptionsEx


method instead of the GetSignAppearanceOptions method.
GetSignAppearanceOptions method is maintained to support legacy
applications.

Copyright 2009 IntegriSign


2.3.17 SetSignPreferences

Description

This function lets you specify whether the signature information like
Comments and Location are mandatory. You can also specify whether the
above fields are to be locked during the act of signing.

Parameters

CommentsRequired (In) – Data type Integer

LocationRequired (In) – Data type Integer

LockCommentsFld (In) – Data type Integer

LockLocationFld (In) – Data type String

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

NOTE: It is recommended to use the SetSignPreferencesEx method


instead of the SetSignPreferences method. SetSignPreferences
method is maintained to support legacy applications.

2.3.18 SetAffirmationText

Description

Sets the affirmation Text to be displayed on the ePad device while signing
with LCD devices.

Parameters

AffirmationText (In) – Data type String

LocationRequired (In) – Data type Integer

LockCommentsFld (In) – Data type Integer

LockLocationFld (In) – Data type String

For all the above parameters a value of 1 means true and 0 means false.

Return Value
This function does not return any value.

Copyright 2009 IntegriSign


2.3.19 GetImageData

Description

Returns encoded (Base64) Signature image data for storage as string.

Parameters

nHeight – Data type Integer - Height of the bmp image in pixels.

nWidth – Data type Integer - Width of the bmp image in pixels.

FileType - Data type FILETYPE – Indicates type of file (image) storage. (BMP
= 0, JPEG =1, GIF=2)

ImageQuality – Data type Integer – For image quality (jpeg). An Optional


parameter.

Note: ImageQuality should be between 0 and 100. If the parameter is not set or is set to zero
ImageQuality is taken as 80 by default.

Return Value
ImageData – Data type String - Encoded (Base64) Signature image data for
storage.

2.3.20 GetImageBytes

Description

Returns Signature image data for storage as a Byte array.

Parameters

nHeight – Data type Integer - Height of the bmp image in pixels.

nWidth – Data type Integer - Width of the bmp image in pixels.

FileType - Data type FILETYPE – Indicates type of file (image) storage. (BMP
= 0, JPEG =1)

ImageQuality – Data type Integer – For image quality (jpeg). An Optional


parameter.

Note: ImageQuality should be between 0 and 100. If the parameter is not set or is set to zero
ImageQuality is taken as 80 by default.

Return Value
ImageBytes – Data type ByteArray - Signature image bytes for storage.

Copyright 2009 IntegriSign


3. esSignPDF Component (esSignPDF.dll)

Sign PDF is used to fill the given form fields and sign existing signature fields
in an Adobe Acrobat document (PDF) automatically using esSignPDF
component from an external application. This method takes the PDF
document path, form field data to be filled as input parameters along with the
optional output path.

3.1 Methods

3.1.1 SignPDF

Description

This function lets a PDF file to be signed from an external application. This
function can also be used to populate other form-field data in the PDF apart
from signing.

Parameters

SourcePath (In) – Data type String (Source PDF name including file path into
which signature and other field data need to be exported).

SignData (In) – Data type Variant array (SignData array needs to be a two
dimensional array. The first element providing the form field name and the
second element corresponding field data.)

SavePath (In, optional) – Data type String (An optional parameter specifying
the destination PDF file name including the file path into which signed PDF is
saved. If not specified, signed PDF is saved into the SourcePath file by
default)

Return Value
This function returns a Long value.

0 - PDF document signed successfully.


1 - The supplied source file path is invalid.
2 - The supplied field name or signature data is null or invalid.
3 - Internal error while parsing the request.
4 - Internal error while parsing the request.
5 - Unable to open Adobe Acrobat for performing the signing operation.
6 - An unknown error has occurred while trying to sign the signature fields.
7 - An unknown error has occurred while trying to sign the signature fields.
8 - An unknown error has occurred while trying to sign the signature fields.
10 - The supplied field name or signature data is null or invalid.
11 - The specified signature field could not be found or invalid.
12 - The specified signature field could not be found or invalid.
13 - The specified signature field could not be found or invalid.
14 - An unknown error has occurred while trying to sign the signature fields.
15 - An unknown error has occurred while trying to sign the signature fields.
16 - An unknown error has occurred while trying to sign the signature fields.

Copyright 2009 IntegriSign

Potrebbero piacerti anche