调用 DynamicCapture 后如何从外部检索签名

Once I call DynamicCapture how can I externally retrieve the signature

所以我有一些调用动态捕获方法的代码。然后我可以获得用户的输入等。我的问题是:如何从外部中断动态捕获。例如出纳员发送签名请求,成员签名——然后出纳员想要手动检索签名(因为用户没有单击“确定”,或者他们可能想要中止签名)。如何中断动态捕获?到目前为止,我尝试过的一切都失败了。

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();
}

来源:Wacom 技术支持

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.

但是,如果不使用 DynamicCapture,并使用 wizCtl 对象,那么您可以通过以下方式远程触发按钮:wizCtl.fireClick(OK_BUTTON_ID);