SetSignDocMode

Declaration

Delphi

function SetSignDocMode(x1,y1,x2,y2, pageNum : integer) : LongBool; stdcall;

ActiveX

HRESULT _stdcall SetSignDocMode([in] long x1, [in] long y1, [in] long x2, [in] long y2, [in] long PageNum, [out, retval] VARIANT_BOOL* result);


Description

With this function you can enable the SignInDocument mode for devices with colour displays (ColourPad, Brilliance, Comfort). If you don't use this function, the default signing mode will automatically be used, where you see the default flags or your own custom background image instead of the document. The used coordinates should be the same, which will be used later for AddSignature. The red signing frame/rectangle can be changed by using SetSignatureFrameParams and the zoom level can be set by using SetLcdSignZoom.

Important!

Be sure, that you have already loaded the document before you call this function! You also need to link the DeviceAPI to the SignAPI (see InitDeviceDLL / SignatureDevice )



Arguments

ArgumentDescription
x1, y1Coordinates of the signature rectangle's top left corner
x2, y2Coordinates of the signature rectangle's bottom right corner
pageNumNumber of the document's page, which should be shown


Calculation of the PDF coordinates

The top/left has the value 0/0 and for the calculation you can use the following formula:

A4= 8.27 x 11.69 inch with 72points/inch = 595x842 points

1 point = 0.03527777778 centimeters

1point = 0.01388888889 inch

Example: 5cm are 142 points (5cm / 0.03527777778 = 141,7323)


C# sample

 

AddSignature
// set coordinates for SignInDoc-Mode
 
int x1 = 100;
int x2 = 250;
int y1 = 100;
int y2 = 200;
int page = 1;

 
bool status = SignAPIv4.SetSignDocMode(x1, y1, x2, y2, page);