I could not understand the idea you mentioned but you can upload document in alfresco to digitally sign and use Alfresco for managing document. Your application can communicate to Alfresco using RestAPI.
Thank you for your quick response. Basically, I want to open a document from my web application for digital signature. Can it possible to sign a document by using Alfresco RestAPI? Could you please give an example link for calling Alfresco Rest API?