Open atirtahirgroupdocs opened 4 years ago
Hi @atirtahirgroupdocs thank you for your question.
To customize sign action try the following:
Create a custom document signing action. For example:
signDocument() {
//this.prepareSignaturesData() is taken from parent component
const signatures = this.prepareSignaturesData();
//this.credentials.password is taken from parent component
this.password = this.credentials.password;
const docType = FileUtil.find(this.currentFile.Name).format;
//this.guid - is a file name or any other string data to determine which file is currently signing
this._appService.sign(this.guid, signatures, docType, this.password).subscribe((file: any) => {
//do something with responce
});
}
Create custom action to send sign document API call.
In the code example from step 1 it's a _this._appService.sign()_
action.
For example:
sign(documentGuid: string, signatures: any[], fileType: string, password: string) {
return this._http.post(this._config.getProductsApiEndpoint() + urlToApiAction, {
guid: hash,
password: password,
signaturesData: signatures,
documentType: fileType,
}, Api.httpOptionsJson);
}
3. Set this action to sign button in html template like shown on the screenshot above.
![screenshot](https://user-images.githubusercontent.com/2689279/102060451-ddf6f600-3dfa-11eb-80f4-2bef5738817c.png)
This issue is raised here https://forum.groupdocs.com/t/digital-signature-application-compatibility-with-internet-explorer-using-spring-java/7898/48.
Hi,
super.selectFile()
in custom componentsign()
insignatureservice
but not sure how to achieve thisHave a look at this screenshot.
Summary: Have a look at the attached code (code.txt). User is able to successfully render the document by calling
selectFile()
method. User wants to modify few things in this servicesign()
fromSignatureService.ts
and call it explicitly in my Component. Have a look at this image. How can we do it?. Please assist.code.txt