wacom

Once I call DynamicCapture how can I externally retrieve the signature


So I have some code that calls the dynamic capture method. I then can get the user's input etc. My question is: How can I interrupt the dynamic capture externally. e.g. Teller sends the sign request, member signs -- then the teller want to manually retrieve the signature (because the user isn't clicking on OK, or perhaps they want to abort the signature). How can I interrupt the dynamic capture? Everything I've tried has failed so far.

DynamicCapture dc = new DynamicCapture();
int rc = dc.capture(sigCtl, who, why, null, null); // dc.capture(sigCtl, "who", "why", null, null);
if(rc == 0) {
    System.err.println("signature captured successfully\n");
    String fileName = "signature.jpg";
    SigObj sig = sigCtl.signature();
    sig.extraData("AdditionalData", "CaptureImage.java Additional Data");
    int flags = SigObj.outputFilename | SigObj.color32BPP | SigObj.encodeData;
    sig.renderBitmap(fileName, 300, 233, "image/png", 0.7f, 0x000000, 0xffffff, 0.5f, 0.0f, flags); //flags are: filename, dimensionX, dimensionY, mimeType, inkWidth, inkColor, inkBackground, paddingX, paddingY
    paintSignature(fileName);
    retrieve();
}

Solution

  • Source: Wacom Technical Support

    FireClick cannot be applied to Dynamic Capture so there is no way to activate the cancel button from the application. I guess you would have to put some sort of timer in and then exit the application completely if there was no response from the user.

    However if not using DynamicCapture, and using the wizCtl object then you can remotely fire the buttons via: wizCtl.fireClick(OK_BUTTON_ID);