visit Kofax web site

Kofax Capture plugin

SOFTPRO Capture plugin

Plugin Version 2.1.10.0
ActiveX Version 2.1.10.0
ActiveX CLSID {FF6EC0EB-F5A9-436c-A64C-F63791FCC157}
COM plugin: ActiveCap.cab.
Nescape plugin: SpCapPlugin.jar, SpCapPlugin.xpi, NpSpCap32.dll.

The SOFTPRO Capture plugin implements these functions

Function 'query plugin version'

Query the plugin version.

Parameters:

Return values:

Function 'query tablet type'

Query the connected tablet model and some characteristics of the tablet.

The plugin cabinet files include modules to access the manufacturers drivers of tablet. You must install the SOFTPRO interfaces when not using Internet Explorer.

You must install the manufacturers drivers when connecting the tablet, except for TabletPC's. TabletPCs are supported without additional modules.

Parameters:

Return values:
Note:
This function is license restricted in SOFTPRO SignDoc and SOFTPRO Capture plugins. You must either install a 'BrowserPlugin' License or pass a valid 'Auth' Parameter, License restrictions.
Internet Explorer: You must turn off 'Protected Mode' if you do not use the Auth mechanism.

Function 'acquire signature or reference'

Capture a signature or reference on the client and return the captured signature incl. all biometric features.

The plugin may also show a document on ta tablet screen, capture signatures for the signature fields in the document, see Document view / sign for more information.

The plugin cabinet files include modules to access the manufacturers drivers of tablet. You must install the SOFTPRO interfaces when not using Internet Explorer.

You must install the manufacturers drivers when connecting the tablet, except for TabletPC's. TabletPCs are supported without additional modules. For details on tablet configuration please see Pad installation and configuration.

Parameters:

Return values:
Note:
The plugin will display three buttons in the signature entry dialog for "OK", "Cancel" and "Erase", if no PadEntryOptions are specified.

The parameters 'sign', 'sign_order', 'encoding' may be omitted if the PadOptions specify 'ResultFormat' 'None'.
The parameters 'img', 'img_order' and 'img_encoding' may be omitted if the PadOptions specify 'ResultImageFormat' 'None'.

This function is license restricted in SOFTPRO SignDoc and SOFTPRO Capture plugins. You must either install a 'BrowserPlugin' License or pass a valid 'Auth' Parameter, License restrictions.
Internet Explorer: You must turn off 'Protected Mode' if you do not use the Auth mechanism.

Optional Signature entry parameters

The signature entry dialog may be customized with images, text, text fields and buttons. The elements are displayed on the PC screen and / or on the tablet LCD screen. All optional fields must be defined in a XML descriptor, which is passed to the signature entry dialog in the parameter 'PadEntryOptions'.

These visible objects must be layed out:

You may add elements within the visible objects:

A set of flags define the behaviour of PlButton / PlText and PlTextEntry objects (not all flagas are supported for all objects)

Limitations

Not all Fonts may be installed on the client side. The plugin will try to find the closest font possible to match the requested font face and font size, however the developer should assure that the font is available locally on the client PC.

Keyboard navigation (Ctrl TAB, Ctrl Shift TAB) is not supported.

Euro - symbol does not display correctly in PlTextEntry fields

Document Type Definition for PadEntryOptions and ScannerEntryOptions

<!--
 DTD for Parameter PadEntryOptions in SOFTPRO plugins
 Module: PadEntryOptions.dtd
 Created by: uko

 Copyright SOFTPRO GmbH
 Wilhelmstrasse 34, D-71034 Böblingen
 All rights reserved.

 This software is the confidential and proprietary
 information of SOFTPRO ("Confidential Information"). You
 shall not disclose such Confidential Information and shall
 use it only in accordance with the terms of the license
 agreement you entered into with SOFTPRO.
-->


<!ELEMENT ScannerEntryOptions (ScannerDialog+, ScannerMessage*, ServiceAccess?, ScannerClass*)>
<!ATTLIST ScannerEntryOptions 
    ScannerClass (ScannerTwain | ScannerWia | ScannerWia2 | ScannerDirectShow | ScannerSane) #IMPLIED
    ScannerId    CDATA #IMPLIED
    ResultImage (Bmp | Png | Gif | Tiff | Jpeg | None) #REQUIRED
    ResultEncoding (Base64Raw | Base64Zip | Base64UrlZip | Base64UrlRaw ) #REQUIRED
>
<!--
 Elements
    ScannerDialog   one or more Dialogs that will be called successively
    ScannerMessage  Text strings for error or warning popups
    ServiceAccess   zero or one object to access the clean service
    ScannerClass    zero or more ScannerClass elements, the attributes ScannerClass and ScannerId will be ignored if 
                    ScannerClass elements are specified
 Attributes
    ScannerClass    deprecated, use element ScannerClass instead
    ScannerId       deprecated, use element ScannerClass instead
    ResultImage The image format of the scanned images, ImageNone will return Gray images in Gif and 
        color images in Jpeg Format, you may overrule the göobal image format via the ScannerSetting object
    ResultEncoding Encoding of the result images:
        - Base64Zip pack all images into a zip file and return the base64 encoded zip file in request 
          parameter images=
        - Base64Raw return all images base64-encoded in request parameters Image0= ... Imagen=
        - Base64UrlRaw return all images base64-URL-safe-encoded (rfc3548) in request parameters Image0= ... Imagen=
        - Base64UrlZip pack all images into a zip file and return the base64-URL-safe encoded (rfc3548) zip file in request 
          parameter images=
        
 Note: ScannerSane is not implemented, ScannerWia2 is not yet implemented
-->

<!ELEMENT ScannerClass EMPTY>
<!ATTLIST ScannerClass
    Class (ScannerTwain | ScannerWia | ScannerWia2 | ScannerDirectShow | ScannerSane) #IMPLIED
    Name  CDATA #IMPLIED
>
<!--
 Attributes
    Class           Class name of Scanner drivers, the Scanner list will be limited 
                    to the devices found in the specified class, all classes are include if the parameter is omitted
    Name            Name of the device as a regular expression

 Note: The devices that may be offered to the user must match the ScannerName. You may leave ScannerName empty to use
       all devices for the according ScannerClass.
       ScannerSane is not implemented, ScannerWia2 is not yet implemented
-->

<!ELEMENT ScannerMessage (#PCDATA)*>
<!ATTLIST ScannerMessage
    Id (DeviceBusy | DeviceOffline | DeviceParameterUnsupported | DeviceNotSelected | ScanImagesMissing | CannotReadFile | InternalError) #REQUIRED
>
<!--
    Elements
        PCDATA  the message string, utf-8 encoded

    Attributes
        Id      the message identifier
-->


<!ELEMENT ServiceAccess EMPTY>
<!ATTLIST ServiceAccess
    Url CDATA #REQUIRED
    User CDATA #IMPLIED
    Password CDATA #IMPLIED
    Timeout CDATA #IMPLIED
    ProxyHost CDATA #IMPLIED
    ProxyPort CDATA #IMPLIED
    ProxyUser CDATA #IMPLIED
    ProxyPassword CDATA #IMPLIED
>
<!--
    Attributes
        Url         the url of the service
        User        optional user name if HTTP Authentication is required
        Password    optional password if HTTP Authentication is required
        Timeout     optional timeout in seconds
        ProxyHost   optional host name of proxy
        ProxyPort   optional port of proxy
        ProxyUser   optional user name for proxy authentication if required
        ProxyPassword optional password for proxy authentication if required
-->


<!ELEMENT ScannerDialog (PlCoordinate, ScannerWindow?, ScannerSetting*, PlText*, PlRectangle*)>
<!ATTLIST ScannerDialog 
    Class   (ScannerCapture | ScannerSettings | ScannerSelectSource) #REQUIRED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
    AllowCrop (true | false | left | none | right) #IMPLIED
>
<!--
 Elements
    PlCoordinate        the size of the Scannerentry window within the plugin window, Origin must be Entry
    ScannerWindow       one or more windows
    ScannerSetting      zero or more ScannerSetting objects
    PlText              zero or more Text elements
    PlRectangle         zero or more Rectangle elements

 Attributes:
    Class               the dialog class name
    BgColor             Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor             Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  
    AllowCrop           left or true: default mouse action is crop image (preset) with left mouse button drag,
                            move image with right mouse button drag, 
                        none or false: default mouse action is move image with left mouse button drag,
                            no action with right mouse button drag
                        right: default mouse action is crop image (preset) with right mouse button drag,
                            move image with left mouse button drag, 
                        Note: the mouse button drag operations will be overruled by ssome actions
                        (e.g. PlAction::ImageCropAction or PlAction::ImageEditAction)
-->


<!ELEMENT ScannerSetting EMPTY>
<!ATTLIST ScannerSetting
    PropertyId CDATA #REQUIRED
    Value      CDATA #REQUIRED
    Required   (true | false) #IMPLIED
>
<!--
 Attributes
    PropertyId the identifyer or the numeric value of the property
        - DeviceName,        1, string, read only
        - DeviceDescription, 2, string, read only
        - DriverClassName,   3, string, read only, use ScannerEntryOptions, Attribute ScannerClass
        - DriverName,        4, string, read only
        - VendorName,        5, string, read only
        - FirmwareVersion,   6, string, read only
        - DeviceId,          7, string, read only, use ScannerEntryOptions, Attribute ScannerId
        - DeviceType,        8, enum DeviceType, read only
        - Papersize,         9, enum Papersize, pass by the numeric enum value or by name (e.g. "A4")
        - Width,            10, int, width in mm (pixel for cameras)
        - OffsetX,          11, int left corner in mm (pixel for cameras)
        - Height,           12, int, height in mm (pixel for cameras)
        - OffsetY,          13, int, top corner in mm (pixel for cameras)
        - ResolutionX,      14, int, resolution DPI
        - ResolutionY,      15, int, resolution DPI
        - ImageFormat,      16, enum ImageFormat, pass by the numeric enum value or by name (e.g. "Bmp")
        - BitsPerPixel,     17, int  1 or 8 or 24
        - Threshold,        18, int, range 0 ... 255
        - Contrast,         19, int, range 0 ... 1000
        - Brightness,       20, int, range 0 ... 1000
        - LightSource,      21, enum LightSource, pass by the numeric enum value or by name (e.g. "Red")
        - ThumbWidth,       22, int, width in pixel, only for camera preview
        - ThumbHeight,      23, int, height in pixel, only for camera preview
        - CaptureAsynchronous, 24, bool, unsupported
        - CanReacquire,     25, bool, read only
        - HasDuplex,        26, bool, read only
        - CanUserGui,       27, bool read only
        - Gain,             29, int, range 0 ... 1000
        - ForceImageSize,   32, bool, DirectSho resize the captured image if the size is larger than specified
    
      enum Papersize:
        - Custom,               1
        
        - A0,                   2
        - A1,                   3
        - A2,                   4
        - A3,                   5
        - A4,                   6
        - A5,                   7
        - A6,                   8
        - A7,                   9
        - A8,                  10

        - B2,                  11
        - B3,                  12
        - B4,                  13
        - B5,                  14
        - B6,                  15

        - C3,                  16
        - C4,                  17
        - C5,                  18
        - C6                   19

      enum DeviceType
        - Default,              1
        - Scanner,              2
        - Camera,               3
        - Video                 4

      enum LightSource
        - Default               1
        - Red,                  2
        - Green,                3
        - Blue,                 4
        - None,                 5
        - White,                6
        - UV,                   7
        - IR,                   8

      enum Image Format
        - None                  1
        - Bmp,                  2
        - Tiff,                 3
        - Jpeg,                 4
        - Png,                  5
        - Gif                   6
      
    Value the value of the property
    Required optional: the property is required, it is an error if the scanner does not support the setting,
        currently not supported, no property is required
-->


<!ELEMENT ScannerWindow (#PCDATA | PlCoordinate | PlText | PlTextEntry | PlButton | PlSlider | PlComboBox | PlRectangle | PlImage )*>
<!ATTLIST ScannerWindow 
    Class   (ImageWindow | ToolWindow|VideoWindow) #REQUIRED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
    Encoding (base64 | base64compressed) #IMPLIED
>
<!--
 Elements
    PlCoordinate one PlCoordinate, the size of the window within the plugin dialog, Origin must be Entry, which refers to the Dialog window
    PlText       zero or more static text fields, only valid in class ToolWindow
    PlTextEntry  zero or more text entry fields, only valid in class ToolWindow
    PlButton     zero or more buttons, only valid in class ToolWindow
    PlSlider     zero or more sliders, only valid in class ToolWindow
    PlComboBox   zero or more combo boxes, only valid in class ToolWindow
    PlRectangle  zero or more Rectangle elements, only valid in class ToolWindow
    PlImage      zero or more Image elements, only valid in class ToolWindow
    #PCDATA      optional Image data, only valid in class ImageWindow
    
 Attributes
    Class     Class name of the object, ImageWindow, ToolWindow or VideoWindow. A ImageWindow displays a scanned image, a ToolWindow
                  is the container for tools, a VideoWindow displays the live stream of a video camera
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  
    Encoding optional Image data format, required if an image is passed
 
 Note: all coordinates must reference the origin plugin or entry, plugin refers to the dialog size,
 entry refers to the size of this ScannerWindow object
-->


<!ELEMENT PadEntryOptions (PadEntryDialog*)>
<!ATTLIST PadEntryOptions
    EncryptModule CDATA #IMPLIED
    EncryptParameter CDATA #IMPLIED
    PadSerialType (Default | Custom | Factory) "Default"
    ResultEncoding (Base64 | Base64Url | NibbleHex | Base64SPEncrypt | Base64UrlSPEncrypt | NibbleHexSPEncrypt ) "NibbleHex"
    ResultFormat ( None | SP_SOFTPRO | ISO_19794) "SP_SOFTPRO"
    ResultImageEncoding (Base64Zip | Base64UrlZip | Base64ZipEncrypt | Base64UrlZipEncrypt ) "Base64Zip"
    ResultImageFormat ( None |  Bmp | Png | Gif | Tiff) "None"
>
<!--
 Elements
     PadEntryDialog one or more Dialogs that will be called successively

  Attributes
     EncryptModule the name of the optional encryption module.
                  Note: it is an error if the specified module cannot be loaded
     EncryptParameter Optional parameters for the encryption module.
     PadSerialType type of device serial number to embed in the signature
       - Default    custom-set ID if set, factory-set ID otherwise
       - Custom     custom-set ID
       - Factory    factory-set ID
     ResultEncoding Encoding of the final result signature(s)
     ResultFormat the format of the resulting signatures.
       - None       don't return dynamic signature data
       - SP_SOFTPRO use the proprietary SOFTPRO signature format, which embeds multiple signatures in a
                    single flatfile structure
       - ISO_19794  serialize the captured signatures in a CBEFF format according to ISO 19785-3
     ResultImageEncoding Encoding of the final result signature images
     ResultImageFormat the format of the resulting signature images.
       - None       don't return signature images
       - Bmp        convert the captured signatures to Bmp-images and return the image
       - Png        convert the captured signatures to Png-images and return the image
       - Gif        convert the captured signatures to Gif-images and return the image
       - Tiff       convert the captured signatures to Tiff-images and return the image
       
Note: The parser in the browser plugins (ActiveTC, NSSPRo32) is compatible with older versions
of this dtd, that means
<PadEntryOptions (PlCoordinate, PlText*, PlTextEntry*, PlImage?, PlButton*, PlTablet?) />
will be interpreted as:
<PadEntryOptions (PadEntryDialog (PlCoordinate, PlText*, PlTextEntry*, PlImage?, PlButton*, PlTablet?) /) />
A mix of both versions will produce undefined results.
-->

<!ELEMENT PadEntryDialog (PlCoordinate, PlTablet?, (PlText | PlTextEntry | PlImage | PlDocument | PlButton | PlRectangle)* )>
<!ATTLIST PadEntryDialog 
    BgColor CDATA #IMPLIED 
    FgColor CDATA #IMPLIED
    Mandatory (True|False) #IMPLIED
>
<!--
 Elements
     PlCoordinate the size of the Pad entry window within the plugin window
     PlText       zero or more static text fields
     PlTextEntry  zero or more text entry fields
     PlImage      zero or more background images
     PlDocument   zero or more background documents
     PlButton     zero or more buttons
     PlRectangle  zero or more rectangles
     PlTablet     zero or one tablet descriptor

  Attributes
     BgColor      Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color
                  default white 
     FgColor      Foreground color, 0x00rrggbb, use foreground color to draw tablet strokes
                  default black 
     Mandatory    The captured signature in this dialog is required if true, default: true
                  Note: the attribute PlTablet Flags (value 0x10, turn off stroke echo) 
                  has presedence. If PlTablet Flags value 0x10 is set then Mandatory is
                  ignored.
-->

<!ELEMENT PlCoordinate EMPTY >
<!ATTLIST PlCoordinate
     Origin (Plugin | Entry | Document) #REQUIRED
     Left   CDATA #REQUIRED
     Top    CDATA #REQUIRED
     Right  CDATA #REQUIRED
     Bottom CDATA #REQUIRED
>
<!--
 Attributes:
     Origin Origin may be one of the following:
         - Plugin all coordinates are relative to the top left corner of the plugin window,
                 (0, 0 , 1000, 1000) cover the entire Plugin window
         - Entry all coordinates are relative to the top left corner of the entry window,
                 (0, 0 , 1000, 1000) cover the entire draw window
         - Document all coordinates are relative to the top left corner of the parent document
                 (0, 0 , 1000, 1000) cover the entire document
     Left    the left position within the origin window
     Top     the top position within the origin window
     Right   the right position within the origin window
     Bottom  the bottom position within the origin window
-->


<!ELEMENT PlAction EMPTY >
<!ATTLIST PlAction
     Name   CDATA #IMPLIED
     Id     (OKAction | CancelAction | EraseAction | SendToAction | NextAction | ToggleAction | PrevAction | GoPageAction |
            ScannerSelectAction | ScannerPapersizeAction | ScannerThresholdAction | ScannerBrightnessAction | 
            ScannerContrastAction | ScannerBitdepthAction | ScannerResolutionAction | ScannerTopAction | ScannerLeftAction |
            ScannerWidthAction | ScannerHeightAction | ScannerLightsourceAction |
            ScanImageAction | ScanSettingsAction |
            ImageInvertAction | ImageMirrorAction | ImageRotateAction | ImageUndoAction | ImageEditAction | ImageCropAction |
            ImagePensizeAction | ImageZoomAction | ImageCleanRectAction | ImageCleanWeightAction |
            ImageWhitenBackground | ImageCleanLinesAction | 
            FileOpenAction | FormFieldAction | SignAction) #REQUIRED
     strValue CDATA #IMPLIED
     iValue CDATA #IMPLIED
     LastSaved (true | false) #IMPLIED
>
<!--
 Attributes:
     Name      the Name of the ToggleAction, the value will be returned as parameter Name=value
     Id        Action identifier may be one of the following:
         - OKAction                   OK button, pass the signature to the servlet
         - CancelAction               Cancel button
         - EraseAction                Erase button
         - NextAction                 Next page button
         - PrevAction                 Previous page button
         - GoPageAction               Show page (value) button, iValue is the page number to display
         - ToggleAction               Toggle button, behaves like a checkbox, the default value may be passed as iValue, 
                                      the name of the checkbox must be supplied as Name
         - SendToAction               call the specified servlet (no signature is passed)
                                      requires attribute URL, overwrites SendTo = "strValue"
         - ScannerSelectAction        Select the desired Scanner, strValue is filled with the selected scanner identifier,
                                      if ScannerSelectAction is assigned to a PlComboBox then the combo items will be read from
                                      the available scanners on the client. Evauate LastSave.
         - ScannerPapersizeAction     Select a Papersize, iValue contains the enum representation of the papersize. 
                                      Evauate LastSave.
         - ScannerThresholdAction     Set a Threshold, iValue contains the (initial) Threshold, range 0 ... 255
                                      Evauate LastSave.
         - ScannerBrightnessAction    Set a Brightness, iValue contains the (initial) Brightness, range 0 .. 1000
                                      Evauate LastSave.
         - ScannerContrastAction      Set a Contrast, iValue contains the (initial) Contrast, range 0 ... 1000
                                      Evauate LastSave.
         - ScannerBitdepthAction      Set a Bitdepth, iValue contains the (initial) Bitdepth
                                      Evauate LastSave.
         - ScannerResolutionAction    Set a Resolution, iValue contains the (initial) Resolution [DPI]
                                      Evauate LastSave.
         - ScannerLeftAction          Set the left corner of a scan capture, iValue contains the (initial) left coordinate [mm]
                                      Evauate LastSave.
         - ScannerTopAction           Set the top corner of a scan capture, iValue contains the (initial) top coordinate [mm]
                                      Evauate LastSave.
         - ScannerWidthAction         Set the width of a scan capture, iValue contains the (initial) width [mm]
                                      Evauate LastSave.
         - ScannerHeightAction        Set the height of a scan capture, iValue contains the (initial) height [mm]
                                      Evauate LastSave.
         - ScannerLightsourceAction   Set the scanner light source, , iValue contains the enum representation of the lightsource
                                      Evauate LastSave.
         - ScanImageAction            Scan an Image,  iValue is a bitwise or of these values:
                - 1  show the settings dialog before scanning an image, show the vendor GUI if no settings dialog is defined
                - 2  show the vendor scan GUI to capture an image
                - 0x1000 auto clean the background, only for gray images, implicitly calls ImageWhitenBackgroundAction 
         - ScanSettingsAction         Display a Settings dialog and scan an image
         - ImageInvertAction          Invert the displayed image
         - ImageMirrorAction          Mirror the displayed image, iValue is a bitwise or of
                - 1 mirror horizontal
                - 2 mirror vertical
         - ImageRotateAction          Rotate the displayed image, iValue is the angle in degrees, 90, 180 or 270
         - ImageUndoAction            Undo the last image processing command
         - ImageCropAction            Select a crop region with the mouse (left button drag),  and cut the selected
                                      region when releasing the left mouse button. The mouse drag will be ignored if the
                                      mouse is release out of the image window
                                      The action behaves like a toggle function, it will be turned on and off in successive calls.
         - ImageEditAction            Draw white (right mouse button) or black (left mouse button) over the image
                                      using a pen with a diameter defined by ImagePensizeAction, the default pen is 3 
                                      (image) pixel wide. The action behaves like a toggle function, it will be 
                                      turned on and off in successive calls. iValue is a bitwise or of
                - 1 swap mouse buttons left and right, left mouse button draws white, right mouse button draws black,
                    else the left mouse button draws black and the right mouse button draws white
                - 2 do not allow to draw black
                - 4 do not allow to draw white
         - ImagePensizeAction         Set the pen size for drawing in the image, iValue defines the pen diameter
                                      in (image) pixel. Evauate LastSave.
         - ImageZoomAction            Image Zoom action will either directly zoom in (iValue == 1) / out (iValue = -1)
                                      at the current center position, or use the mouse (iValue = 0) to zoom in / 
                                      out with left / right mouse click, the center point will be set to the mouse 
                                      position.
                                      The action behaves like a toggle function, it will be turned on and off in 
                                      successive calls (if iValue = 0).
                                      Note: Right / Left double clicks may also zoom in / out, if mouse click events
                                      can be ignored (ImageCropAction, mouse clicks do not modify the image). 
        - ImageCleanLinesAction       clean horizontal and or vertical lines, iValue passes a bitwise ored
                                      value, 1 to clean horizontal and 2 to clean vertical lines
        - ImageCleanWeightAction      Set the weight for the next ImageCleanRectAction, iValue passes the weight,
                                      range 0 ... 1000. Evauate LastSave.
        - ImageCleanRectAction        Clean all rectangles with a weight less than the current weight, iValue 
                                      holds the initial weight, range 0 ... 1000
        - ImageWhitenBackgroundAction Set all pixels to white, if the value is larger than 75 % of the mean background 
                                      level, can be applied to gray images only
        - FileOpenAction      Popup a FileOpen dialog, strValue contains a list of strings that are separated
                                      by '|' characters. The first part includes the title, the other strings are
                                      couples of file description and file extension mask, e. g. 
                                      'Open Read me files|Text files(*.txt;*.me)|*.txt;*.me',
        - FormFieldAction    The according PlTextEdit or PlCombo or PlSlider is a formfield, the result will be returned to
                                      the server as Name = strValue pair, requires Name attribute
                                      FormFieldAction cannot be combined with lastSaved
                                      If a PlText object is assigned FormFieldAction then Attribute strValue must also be set
        - SignAction         Action to Sign a document, the required attribute iValue defines the zero
                                      based PadEntryDialog page index which is activated to capture the signature, 
                                      when the action is invoked

     strValue  optional String parameter to execute the action when activated (clicked), see above for ScannerActions
     iValue    optional integer parameter to execute the action when activated (clicked)
     LastSaved  optional value that indicates to use the last recently saved value, applies to some actions
-->

<!ELEMENT PlCaption EMPTY >
<!ATTLIST PlCaption
    Name CDATA #IMPLIED
    NameId CDATA #REQUIRED
    LangId CDATA #REQUIRED
>
<!--
 Attributes:
     Name The text for this element, The name will be displayed if specified
     NameId an identifier to the language resource for this element
     LangId the language  identifier to translate the element

Note: the PLCaption element is provided for internal use only, e.g. to
build a compatibility PadEntryOption descriptor, if the application does not
pass PadEntryOption(s).
-->


<!ELEMENT PlFont EMPTY >
<!ATTLIST PlFont
     Face    CDATA #REQUIRED
     Size    CDATA #REQUIRED
     Flags   CDATA #IMPLIED
>
<!--
 Attributes
     Face    The face name
     Size    The size of the font (in points)
     Flags   a bitwise or of these values:
         0x00000001  Bold
         0x00000002  Italic
         0x00000004  Underline
         0x00000008  StrikeOut

     Note: the font size is entered in points. A point is an absolute value 1 / 72 inch. The Font size will
     be calculated in the source coordinate system, and then converted to the destination coordinate system.
-->


<!ELEMENT PlTablet (PlCoordinate?, PlIdleTimeout?) >
<!ATTLIST PlTablet
     Flags           CDATA #IMPLIED
     PenThickness    CDATA #IMPLIED
>
<!-- 
 Elements
     PlCoordinate    clip rectangle coordinates of the signature region, optional, Origin should be Entry
     PlIdleTimeout   optional idle timeout action

 Attributes
     Flags   A a bitwise or of these values:
         0x00000001  The clip rectangle will be applied when rendering strokes on the PC screen,
                     vectors outside the clipping region will neither be rendered nor appended 
                     to the signature 
         0x00000002  The clip rectangle will be applied when rendering strokes on the tablet screen,
                     if supported by the tablet
         0x00000010  don't echo stroke vectors to the tablet display (useful for text only screens)
         0x00000020  the tablet is used upside down (rotated by 180 degrees), ignored on Fullscreen
                     devices such as TabletPC's or Wacom PL series
         0x00000040  Force a black-white background image on the tablet, even if the tablet supports
                     color images
                     
     PenThickness    Thickness of the pen to draw pen strokes, range 1 ... 255,
                     1: thin, 255 bold pen

Note: Clip rectangle and Pen thickness are currently only supported owith SignPad STU-520.
-->

<!ELEMENT PlIdleTimeout (PlAction) >
<!ATTLIST PlIdleTimeout
    Timeout   CDATA #REQUIRED
>
<!-- 
 Elements
     PlAction        The action that should be invoked Timeout[mseconds] after the last tablet stroke

 Attributes
     IdleTimeout     The OK Action will be invoked IdleTimeout[mseconds] after last stroke, 0 is unlimited
-->

<!ELEMENT PlRectangle (PlCoordinate, PlAction?) >
<!ATTLIST PlRectangle
    Diameter  CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
    Flags CDATA #IMPLIED
>
<!-- 
 Elements
     PlCoordinate the coordinates of the rectangle
     PlAction ignored
     
 Attributes
     Diameter   The diameter of round edges, pass 0 to draw rectangle edges, the diameter in pixel is calculated
                     as min(width_pixel, height_pixel) * Diameter / 100
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  

     Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000002  Draw the rectangle in the draw window 
                     Note the rectangle will also be drawn if the flag 'draw on image in entry window' is set.
         0x00000004  Draw the rectangle on the LCD background image of the tablet 
         0x00000008  Draw the rectangle on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
                     
@note the Rectangle has no native implementation
-->


<!ELEMENT PlButton (#PCDATA | PlCoordinate | PlAction | PlCaption | PlFont)* >
<!ATTLIST PlButton
    Caption CDATA #IMPLIED
    Flags   CDATA #REQUIRED
    ToolTip CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
    Encoding (base64 | base64compressed) #IMPLIED
>
<!--
   attributes
     Caption The caption text of the button, in UTF8 notation, requires a PLCaption element if omitted
     Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000001  Draw the button in the Plugin window (Create a native Button),
                     Origin may be either Plugin or Entry
         0x00000002  Draw the button in the draw window (as a virtual button). The button will be drawn
                     as a  simple rectangle.
                     Note the button will also be drawn if the flag 'draw on image in entry window' is set.
         0x00000004  Draw the button on the LCD background image of the tablet (as a virtual button)
         0x00000008  Draw the button on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
         0x00000100  Virtual button, clickable with the pen (default)
         0x00000200  Virtual button, clickable with the mouse (should not be set for
                     native buttons - native buttons are per se clickable with the mouse)
    ToolTip  optional Tooltip-Text, requires a native window button
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color
    Encoding optional Icon data format, required if an icon is passed
    PCDATA   optional Icon data, may be a multi-page Icon, MS ICO Format
-->


<!ELEMENT PlText (PlCoordinate, PlFont?, PlAction?) >
<!ATTLIST PlText
    Caption CDATA #REQUIRED
    Flags   CDATA #REQUIRED
    TextFlags CDATA #REQUIRED
    ToolTip CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
>
<!--
   elements
     PlCoordinate the coordinates of the text object
     PlFont optional Font object
     PlAction optional action object, the action identifyer may be used to dynamicall update the text
         to the value of the action
   attributes
     Caption Caption text, in UTF8 notation
     Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000001  Display the text in the Plugin window (Create a native Label)
         0x00000002  Draw the text in the draw window (will not create a native static window)
                     Note the text will also be drawn if the flag 'draw on image in entry window' is set.
         0x00000004  Draw the text on the LCD background image of the tablet
         0x00000008  Draw the text on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
     TextFlags A binary ored set of bits (prefix 0x to pass a hex number):
         0x00000000  Align top
         0x00000000  Align left
         0x00000001  center horizontally (default)
         0x00000002  Align right
         0x00000004  center vertically (default)
         0x00000008  align bottom
         0x00000010  auto word break (multi line)
         0x00000020  single line (default)
         0x00000040  expand tab characters
         
    ToolTip  optional Tooltip-Text, requires a native text window
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  
-->


<!ELEMENT PlTextEntry (PlCoordinate, PlAction?, PlFont?)>
<!ATTLIST PlTextEntry
    Name    CDATA #REQUIRED
    Flags   CDATA #REQUIRED
    Text    CDATA #IMPLIED
    ToolTip CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
>
<!--
  elements
    PlCoordinate the coordinates of the text entry object
    PlAction the associated action, may be omitted
    PlFont optional font specifyer

  attributes
    Name    the name of this entry, will be returned as ID in the anser request, reqired
    Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000001  Display the text in the Plugin window (Create a native Text entry box)
    Text    The textentry field will be prefilled with the text string
             Deprecated, pass the default text as url in the PlAction object

    ToolTip  optional Tooltip-Text, requires a native TextEntry window
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  
     
   Note: the content of a text entry field is returned as 'Name'="'Text'", where 'Text' is
   read out of the entry field and returned in UTF8 notation, if the text entry is embedded in a 
   PadDialog
   Note: a PlEntryText Object can only be created as a native Text entry box)
-->


<!ELEMENT PlSlider (PlCoordinate, PlAction)>
<!ATTLIST PlSlider
    Minimum   CDATA #REQUIRED
    Maximum   CDATA #REQUIRED
    Page      CDATA #REQUIRED
    Increment CDATA #REQUIRED
    Flags     CDATA #REQUIRED
    ToolTip CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
>
<!--
  elements
    PlCoordinate the coordinates of the slider object
    PlAction the associated action

  attributes
    Minimum the minimum Slider value
    Maximum the maximum Slider value
    Page    the page increment value
    Increment the minumum increment of the slider
    Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000001  Display the text in the Plugin window (Create a native Slider)
         0x00000002  Display the text in the Entry window (Draw a Slider)
         0x00000004  Draw the image on the tablet screen (Draw a slider)
         0x00000008  Draw the slider on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
         0x00010000  Create a horizontal slider, else create a vertical slider
    ToolTip  optional Tooltip-Text, requires a native Slider window
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  
     
   Note the default slider position will be read from the associated action
   Note a slider within a document view will overwrite Minimum, Maximum, Page and Increment
-->


<!ELEMENT PlComboItem (PlAction)>
<!ATTLIST PlComboItem
    Caption CDATA #REQUIRED
>
<!--
   attributes
     Caption the caption text that will be displayed in the combo box
-->


<!ELEMENT PlComboBox (PlCoordinate, PlFont+, PlComboItem?)>
<!ATTLIST PlComboBox
    Flags     CDATA #REQUIRED
    ToolTip CDATA #IMPLIED
    BgColor CDATA #IMPLIED
    FgColor CDATA #IMPLIED
>
<!--
  elements
    PlCoordinate the coordinates of the combo object
    PlFont optional font
    PlComboItem one or more items to select

 attributes
    Flags   A binary ored set of bits (prefix 0x to pass a hex number), required:
         0x00000001  Display the text in the Plugin window (Create a native Combo box)
         0x00000002  Display the text in the Entry window (Create a native Combo box)
    ToolTip  optional Tooltip-Text, requires a native Combo window
    BgColor  Background color, 0x00rrggbb, pass 0xffffffff to define transparent window color  
    FgColor  Foreground color, 0x00rrggbb, pass 0xffffffff to define transparent window color,  

   Note: a PlComboBox Object can only be created as a native Combo window)
-->

<!ELEMENT PlImage (#PCDATA | PlCoordinate)* >
<!ATTLIST PlImage
     Format  CDATA #REQUIRED
     Flags   CDATA #REQUIRED
     Width   CDATA #IMPLIED
     Height  CDATA #IMPLIED
     TransparentColor CDATA #IMPLIED
>
<!--
  elements
    PlCoordinate optional coordinates of the image object

   attributes
     Flags   A binary ored set of bits(prefix 0x to pass a hex number)
         0x00000002  Draw the image in the entry window
         0x00000004  Draw the image on the tablet screen
         0x00000008  Draw the image on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
         0x00001000  Draw the image opaque, default is transparent, transparent color is white
     Format  Image format
         1           fully qualified file name (on the local file system,
                     http or ftp requests are not supported)
         2           binary Image data  (it may be difficult to embed binary data
                     in a XML string)
         3           Base64 coded Image data
         4           Base64 coded compressed Image data
         5           create an empty image (width and height must be specified)
     width   Image width (optional, may be 0), required for empty images
     height  Image height (optional, may be 0), required for empty images
     TransparentColor color that will be made transparent if the opaque bit is not set
     
   Note: the PlCoordinate is required, but the plugins will assign a default
   PlCoordinate (0, 1000, 0, 1000) for upward compatibility if the PlCoordinate is omitted
   Note: the passed image should be a Windows Bitmap format. PlImage will read gif, png, tiff and jpeg
         images, if GdiPlus is installed on the computer. The image should have a color resolution
         as required for the destination; the image should be black white if it should be inserted 
         in a tablet LCD screen or true color for STU-520 devices.
   Note: Under Win XP: GdiPlus always converts b/w PNG images full color images, which might fail 
         to render for a b/w tablet screen
-->

<!ELEMENT PlDocument (#PCDATA | PlCoordinate | PlSlider | PlButton)* >
<!ATTLIST PlDocument
     Format  CDATA #REQUIRED
     Flags   CDATA #REQUIRED
     Width   CDATA #IMPLIED
     Height  CDATA #IMPLIED
     Zoom    CDATA #REQUIRED
     TransparentColor CDATA #IMPLIED
>
<!--
  elements
    PlCoordinate one PlCoordinate, coordinates of the document object
    PlSlider zero to two sliders to scroll the document, the assigned action is ignored, will always
      be scroll up / down in a vertical slider, and scroll left / right in a horizontal slider
    PlButton zero or more buttons associated to the document. The document object evaluates 
      zoom in and zoom out actions (action ImageZoomAction with value = 1 / -1).
      The document object evaluates SignAction buttons, which invoke the specified dialog page,
      captures a signature, displays the signature in the button icon, and returns the signature.
      Other button actions may be prev / next page or OK

   attributes
     Flags   A binary ored set of bits(prefix 0x to pass a hex number)
         0x00000002  Draw the document in the entry window
         0x00000004  Draw the document on the tablet screen
         0x00000008  Draw the document on the image in the entry window  (this option will draw an equivalent image on the
                     PC screen as sent to the tablet)
         0x00001000  Draw the document opaque, default is transparent, transparent color is white
     Format  Image format
         1           fully qualified file name (on the local file system,
                     http or ftp requests are not supported)
         2           binary Image data  (it may be difficult to embed binary data
                     in a XML string)
         3           Base64 coded Image data
         4           Base64 coded compressed Image data
     Zoom    initial zoom, FitWidth, FitHeight, FitAll or a floating number 
     TransparentColor color that will be made transparent if the opaque bit is not set
     
   Note: the passed document should be a Windows Bitmap format. PlDocument will read gif, png, tiff and jpeg
         images, if GdiPlus is installed on the computer. the document should be black white if it should 
         be displayed on a tablet LCD screen or true color for STU-520 devices.
   Note: Under Win XP: GdiPlus always converts b/w PNG images to full color images, which might fail 
         to render for a b/w tablet screen
-->


<!--
Numbers may be passed as decimal numbers, or as hexadecimal numbers if prefixed
with '0x' or postfixed with 'h'
-->

License restrictions

The SOFTPRO SignDoc and SOFTPRO Capture plugins are license restricted. The license may either be passed via an optional parameter (Auth) or checked on the local (client) host.

If the Auth parameter is used then the Auth parameter must pass a valid license ticket. The plugins return a License error, if the Auth parameter does not contain a valid ticket.

The local license manager is only contacted if the Auth parameter is not passed or empty. Plugins require a 'BrowserPlugin' license fully installed on the local host. The file splm2.dll must be accessible in the path (or system32) folder.

Tablet creation parameters

A total of three parameters define the selection of a tablet.

Document view / sign

Example to view and optionally 'sign' a document.

The example passes a document image with two signature fields. Two virtual buttons are included at the positions of the signature fields, which will invoke a signature capture dialog. The captured signatures will be displayed in the signature fields after confirmation.
The final result will return the captured signatures, the server may embed the signatures in the document, e.g. as a digital signature in a PDF document.

<?xml version="1.0" encoding="UTF-8"?>
<PadEntryOptions>
    <PadEntryDialog BgColor="0xE0FFFF" FgColor="0xFF" Mandatory="true">
        <PlCoordinate Origin="Plugin" Left="0" Right="1000" Top="0" Bottom="1000"/>

        <!-- The embedded Image is incompletely shown here -->
        <PlDocument Flags="0x6" Format="0x4" Zoom="FitHeight">eJwUl/cj1I/...
            <PlCoordinate Origin="Entry" Left="0" Right="1000" Top="100" Bottom="1000"/>

            <!-- The slider coordinates have origin 'NoOrigin' which will auto-layout the sliders -->
            <PlSlider BgColor="0xFFFF00" Flags="0x10306" Minimum="0x0" Maximum="0x3E8" Increment="0x1" Page="0xA">
                <PlCoordinate Origin="NoOrigin" Left="0" Right="1000" Top="0" Bottom="1000"/>
                <PlAction Id="OKAction" LastSaved="false"/>
            </PlSlider>
            <PlSlider BgColor="0xFFFF00" Flags="0x306" Minimum="0x0" Maximum="0x3E8" Increment="0x1" Page="0xA">
                <PlCoordinate Origin="NoOrigin" Left="0" Right="1000" Top="0" Bottom="1000"/>
                <PlAction Id="OKAction" LastSaved="false"/>
            </PlSlider>
            <PlButton Flags="0x306" Caption="OK" BgColor="0xFF00" FgColor="0xFF">
                <PlCoordinate Origin="Entry" Left="25" Right="325" Top="10" Bottom="90"/>
                <PlAction Id="OKAction" LastSaved="false"/>
                <PlFont Face="0" Size="0xC" Flags="0x0"/>
            </PlButton>
            <PlButton Flags="0x306" Caption="Zoom -" BgColor="0xFF0000" FgColor="0x0">
                <PlCoordinate Origin="Entry" Left="350" Right="650" Top="10" Bottom="90"/>
                <PlAction Id="ImageZoomAction" iValue="0xFFFFFFFF" LastSaved="false"/>
                <PlFont Face="0" Size="0xC" Flags="0x0"/>
            </PlButton>
            <PlButton Flags="0x306" Caption="Zoom +" BgColor="0xFF0000" FgColor="0x0">
                <PlCoordinate Origin="Entry" Left="675" Right="975" Top="10" Bottom="90"/>
                <PlAction Id="ImageZoomAction" iValue="0x1" LastSaved="false"/>
                <PlFont Face="0" Size="0xC" Flags="0x0"/>
            </PlButton>

            <!-- Siganture field 1
                 The coordinates of the signature fields on the doocument must be known and passed -->
            <PlButton Flags="0x306" Caption="" BgColor="0xFFFFFFFF" FgColor="0x0">
                <PlCoordinate Origin="Document" Left="542" Right="730" Top="786" Bottom="823"/>
                <PlAction Id="SignAction" iValue="0x1" LastSaved="false"/>
                <PlFont Face="0" Size="0xC" Flags="0x0"/>
            </PlButton>

            <!--  Signature field 2
                  The coordinates of the signature fields on the doocument must be known and passed -->
            <PlButton Flags="0x306" Caption="" BgColor="0xFFFFFFFF" FgColor="0x0">
                <PlCoordinate Origin="Document" Left="736" Right="947" Top="786" Bottom="823"/>
                <PlAction Id="SignAction" iValue="0x2" LastSaved="false"/>
                <PlFont Face="0" Size="0xC" Flags="0x0"/>
            </PlButton>
        </PlDocument>
    </PadEntryDialog>

    <!-- This dialog is not mandatory, the signature must not necessarily be entered -->
    <PadEntryDialog Mandatory="false">
        <PlCoordinate Origin="Plugin" Left="0" Right="1000" Top="0" Bottom="850"/>
        <PlText TextFlags="0x21" Flags="0x6" Caption="Signature field 1">
            <PlCoordinate Origin="Entry" Left="0" Right="1000" Top="800" Bottom="900"/>
        </PlText>

        <!-- The OK button invokes a GoPageAction which shows page 0 (the document) -->
        <PlButton Flags="0x306" Caption="OK">
            <PlCoordinate Origin="Entry" Left="25" Right="325" Top="900" Bottom="990"/>
            <PlAction Id="GoPageAction" iValue="0x0" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>
        <PlButton Flags="0x306" Caption="Erase">
            <PlCoordinate Origin="Entry" Left="350" Right="650" Top="900" Bottom="990"/>
            <PlAction Id="EraseAction" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>
        <PlButton Flags="0x306" Caption="Cancel">
            <PlCoordinate Origin="Entry" Left="675" Right="975" Top="900" Bottom="990"/>
            <PlAction Id="CancelAction" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>

        <!-- The embedded Image is incompletely shown here -->
        <PlImage Flags="0x6" Format="0x4">eJzt3...</PlImage>
    </PadEntryDialog>

    <!-- This dialog is not mandatory, the signature must not necessarily be entered -->
    <PadEntryDialog Mandatory="false">
        <PlCoordinate Origin="Plugin" Left="0" Right="1000" Top="0" Bottom="850"/>
        <PlText TextFlags="0x21" Flags="0x6" Caption="Signature field 2">
            <PlCoordinate Origin="Entry" Left="0" Right="1000" Top="800" Bottom="900"/>
        </PlText>

        <!-- The OK button invokes a GoPageAction which shows page 0 (the document) -->
        <PlButton Flags="0x306" Caption="OK">
            <PlCoordinate Origin="Entry" Left="25" Right="325" Top="900" Bottom="990"/>
            <PlAction Id="GoPageAction" iValue="0x0" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>
        <PlButton Flags="0x306" Caption="Erase">
            <PlCoordinate Origin="Entry" Left="350" Right="650" Top="900" Bottom="990"/>
            <PlAction Id="EraseAction" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>
        <PlButton Flags="0x306" Caption="Cancel">
            <PlCoordinate Origin="Entry" Left="675" Right="975" Top="900" Bottom="990"/>
            <PlAction Id="CancelAction" LastSaved="false"/>
            <PlFont Face="0" Size="0xC" Flags="0x0"/>
        </PlButton>

        <!-- The embedded Image is incompletely shown here -->
        <PlImage Flags="0x6" Format="0x4">eJzt3...</PlImage>
    </PadEntryDialog>
</PadEntryOptions>

Function 'Scanner'

Capture an image from the scanner on the local (client) computer.
Please note that this function requires the Microsoft module Gdiplus, Version 1.0. Function 'Scanner' will return an error if Gdiplus ist not accessible.

Parameters:

Return values: The scanner plugin implements a multi page dialog. A dialog class is assigned to each dialog, the class type specifies the behaviour: Each dialog contains several windows. The windows are identified by the class names, which defines the behaviour of a window: A dialog will typically host one ImageWindow, and one or more ToolWindow and one VideoWindow if DirectShow sources shall be supported.

A ToolWindow hosts several GUI elements such as Buttons (PlButton), Sliders (PlSlider), TextEntry fields (PlTextEntry), Combo boxes (PlComboBox) and text elements (PlText). Each GUI element has a coordinate object that defines the position of the element relative to the window (Origin = Entry) or relative to the dialog (Origin = plugin). Each GUI element also requires an action identifyer (PlAction) which defines the command that will be invoked whenever invoked. The action includes an attribute to define, if the last recently used setting will be reloaded during initialisation.

The plugin saves settings in the registry, the root key is HKCU\software\softpro\plugins\scanner.

PlText elements wich have an assigned action will be synchronized to the corresponding GUI element with the same action identifyer.

Action commands:

A scan action will either popup a manufacturer Dialog (iValue & 2 is set), or pass settings from the plugin.


The plugin reads global ScannerSettings element in the ScannerDialog, and updates the settings from the GUI elements that have the according PlAction identifyer. Scanner settings are read in this order:

These Scanner Settings are defined: Video cameras and web cameras support a subset of the above settings: Please note that web cameras are typically controlled by a manufacturer service that is started whenever an application opens the device. The service may overrule settings, which means that e. g. image size cannot be set by the plugin but will be set by the service.

enum Papersize:

enum DeviceType

enum LightSource

enum Image Format

The final OK button checks if all ScannerCapture dialogs contain an image, and pops up a message if any images are missing. The user can exit with the cancel button, or he must fill all images.

Note on Signature cleaning
Some features have been included which are optimized for Signature cleaning. Signature cleaning is available for black/white and for gray images.
Signature cleaning includes calculation of weighted frames. The image is split into frames, and a weight is assigned to each frame which gives an indication of the trust that a frame is a part of a signature, or is dirt, or a line etc.
The plugin uses some external libraries which calculate the rectangles including the associated weight. These libraries must thus be accessible locally on the host computer (which requires an additional installation of the package) or must be accessible through a web service. The web service will be used if the element ServiceAccess is added and the url of the service is defined.
The external libraries include: fsxtk.dll, fsxtkkrn.dll, tifflib.dll
The weighted rectangles are calculated whenever the image is modified, however the rectangles will not be recalculated while editing an image (the rectangles will be recalculated 2 seconds after the last mouse release event).

Note:
This function is license restricted in SOFTPRO SignDoc and SOFTPRO Capture plugins. You must either install a 'BrowserPlugin' License or pass a valid 'Auth' Parameter, License restrictions.
Internet Explorer: You must turn off 'Protected Mode' if you do not use the Auth mechanism.
Todo:
Implement Keyboard navigation

Xml-description of the Webservice required for cleaning

<?xml version="1.0"?>
<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://schema.example.com" targetNamespace="http://schema.example.com">
    <wsdl:types>
        <xsd:schema targetNamespace="http://schema.example.com">
            <xsd:complexType name="WeightedRectArray">
                <xsd:complexContent>
                    <xsd:restriction base="SOAP-ENC:Array">
                        <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:WeightedRect[]"/>
                    </xsd:restriction>
                </xsd:complexContent>
            </xsd:complexType>
            <xsd:complexType name="WeightedRect">
                <xsd:all>
                    <xsd:element name="iBottom" type="xsd:int"/>
                    <xsd:element name="iLeft" type="xsd:int"/>
                    <xsd:element name="iRight" type="xsd:int"/>
                    <xsd:element name="iTop" type="xsd:int"/>
                    <xsd:element name="iWeight" type="xsd:int"/>
                </xsd:all>
            </xsd:complexType>
        </xsd:schema>
    </wsdl:types>
    <message name="cleanFramesRequest">
        <part name="aImage" type="xsd:string"/>
        <part name="iWeight" type="xsd:int"/>
    </message>
    <message name="cleanFramesResponse">
        <part name="cleanFramesReturn" type="xsd:string"/>
    </message>
    <message name="getWeightedFramesRequest">
        <part name="aImage" type="xsd:string"/>
    </message>
    <message name="getWeightedFramesResponse">
        <part name="getWeightedFramesReturn" type="tns:WeightedRectArray"/>
    </message>
    <wsdl:portType name="SivalServicePortType">
        <wsdl:operation name="SivalService"/>
        <wsdl:operation name="cleanFrames">
            <wsdl:input message="tns:cleanFramesRequest"/>
            <wsdl:output message="tns:cleanFramesResponse"/>
        </wsdl:operation>
        <wsdl:operation name="getWeightedFrames">
            <wsdl:input message="tns:getWeightedFramesRequest"/>
            <wsdl:output message="tns:getWeightedFramesResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <binding name="SivalServiceBinding" type="tns:SivalServicePortType">
        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="SivalService">
            <soap:operation soapAction="http://sw-bapi/service.php?class=SivalService&amp;method=SivalService" style="rpc"/>
        </wsdl:operation>
        <wsdl:operation name="cleanFrames">
            <soap:operation soapAction="http://sw-bapi/service.php?class=SivalService&amp;method=cleanFrames" style="rpc"/>
            <wsdl:input>
                <soap:body use="encoded" namespace="http://schema.example.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="encoded" namespace="http://schema.example.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="getWeightedFrames">
            <soap:operation soapAction="http://sw-bapi/service.php?class=SivalService&amp;method=getWeightedFrames" style="rpc"/>
            <wsdl:input>
                <soap:body use="encoded" namespace="http://schema.example.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="encoded" namespace="http://schema.example.com" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:output>
        </wsdl:operation>
    </binding>
    <wsdl:service name="SivalService">
        <wsdl:port name="SivalServicePort" binding="tns:SivalServiceBinding">
            <soap:address location="http://sw-bapi/service.php?class=SivalService"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

// sample framework of the web service in php

/**
 * WeightedRect
 * Container for rectangle coordinates and the associated weight
 */
class WeightedRect 
{
    /**
     * @var int left coordinate
     */
    var $iLeft;
    /**
     * @var int Top coordinate
     */
    var $iTop;
    /**
     * @var int right coordinate
     */
    var $iRight;
    /**
     * @var int bottom coordinate
     */
    var $iBottom;
    /**
     * @var int the weight
     */
    var $iWeight;

    /**
     * Constructor
     * @param int $iLe Left coordinate
     * @param int $iTo Top coordinate
     * @param int $iRi Right coordinate
     * @param int $iBo Bottom coordinate
     * @param int $iWe Weight
     * @return void
     */
    function WeightedRect($iLe, $iTo, $iRe, $iBo, $iWe)
    {
        $this->iLeft = $iLe;
        $this->iTop = $iTo;
        $this->iRight = $iRe;
        $this->iBottom = $iBo;
        $this->iWeight = $iWe;
    }
}

class SivalService 
{
    /**
     * Constructor
     * @return void
     */
    function SivalService()
    {
    }

    /**
     * Request the weighted frames
     * 
     * @param string $aImage the base64 encode image to analyze
     * @return WeightedRect[] an array of class WeightedRect
     */
    function getWeightedFrames($aImage)
    {
        try {
            $sw = new SPSignWare();
            $im = new SPImage();
            $aImage = str_replace(" ", "+", $aImage);
            $im->setBase64Bitmap($aImage);
            $frames = $im->getFrames();
            $result = array();
            for($ik = 0; $ik < $frames->getCount(); $ik++) {
                $result[$ik] = new WeightedRect(
                    $frames->getLeft($ik),   $frames->getTop($ik),
                    $frames->getRight($ik),  $frames->getBottom($ik),
                    floor($frames->getWeight($ik) * 1000.0)
                    );
            }
            return $result;
        } catch(Exception $ex) {
            trace(1, "getWeightedFrames(): cannot query frames, " . $ex->getMessage());
        }
        return new SoapFault("-8", "Signware Error: cannot get SignWare frames");
    }

    /**
     * Clean an image
     * 
     * @param string $aImage the base64 encoded image to clean
     * @param int $iWeight the frame weight for cleaning, range 0 ... 1000
     * @return string the base64 encoded cleaned image
     */
    function cleanFrames($aImage, $iWeight)
    {
        try {
            $sw = new SPSignWare();
            $im = new SPImage();
            $aImage = str_replace(" ", "+", $aImage);
            $im->setBase64Bitmap($aImage);
            $im->cleanFrames((1.0 * $iWeight) / 1000.0);
            $ff = new SPFlatFile();
            $ff->createFromImage($im, 1 /* SP_IMAGE_BMP_WIN */ | 0x200000 /* SP_IMAGE_BLACKWHITE_1BPP */);
            return $ff->getBase64Data();
        } catch(Exception $ex) {
            trace(1, "getWeightedFrames(): cannot query frames, " . $ex->getMessage());
        }
        return new SoapFault("-8", "Signware Error: cannot SignWare clean frames");
    }
}

$server = new SoapServer("wsdl/SivalService.wsdl", array(
    'encoding' => 'utf-8',
    'soap_version' => SOAP_1_2));
$server->setClass('SivalService');
$server->handle();

?>