Creating invisible digital signatures in Android
It isn’t possible to create digital signatures without a signature form field. A SignatureFormField
for signing is always required, but it can have an empty bounding box, making it invisible:
// Create an empty rect. val rectFSignatureFormConfiguration = RectF( 30f, // left 190f, // top 30f, // right 190f // bottom ) val signatureFormConfiguration = SignatureFormConfiguration.Builder(0, rectFSignatureFormConfiguration) .build() val signatureFormField = document.formProvider.addFormElementToPage("signaturefield-1", signatureFormConfiguration) as SignatureFormField // Now perform the digital signing with the newly created form field. performSigning(signatureFormField)
// Create an empty rect. RectF rectFSignatureFormConfiguration = new RectF( 30, // left 190, // top 30, // right 190 // bottom ); SignatureFormConfiguration signatureFormConfiguration = new SignatureFormConfiguration.Builder(0, rectFSignatureFormConfiguration) .build(); SignatureFormField signatureFormField = (SignatureFormField) document.getFormProvider().addFormElementToPage("signaturefield-1", signatureFormConfiguration); // Now perform the digital signing with the newly created form field. performSigning(signatureFormField);
Refer to this guide for information on how to create digital signatures.