on 11-08-2021 7:05 AM
Currently, the signature is being send in (.png) format. We are using these signature to print on smart form, however, the signature is displayed on smart form with a Grey background.
Is it possible to send the signature in (.bmp) ?
Please help.
I'm certainly not an expert but if there isn't any out-of-the-box solution for this particular case I would look into sending to the backend the signature content in a base64 string instead of the usual object returned by the SignatureCapture MDK control. You could then add backend logic to process that base64 and save it in the desired format as per your requirement.
This code snippet might help you achieve the first part of this process:
const platform = clientAPI.nativescript.platformModule;
const signatureObject = clientAPI.evaluateTargetPath("#Page:OrderDetailMedia_CreateSignature/#Control:FormCellSignatureCapture0/#Value");
let signatureContent;
if (platform.isAndroid) {
signatureContent = android.util.Base64.encodeToString(signatureObject.content, android.util.Base64.DEFAULT);
} else if (platform.isIOS) {
signatureContent = signatureObject.content.base64Encoding();
}
return signatureContent
You need to use nativeScript's platform module since Android and iOS use different APIs to handle base64 content.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
10 | |
8 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.