My document is on server and user wants to sign that with USB token which contains DSC, Currently I am able to sign the document with following approach.
1 Client raise a document sign request.
2 Server generates document Hash, stores Signature appearance and BinaryArrayOutputStream object in session.
3 Client signs the document Hash and creates PKCS7 and send it to server.
4 Server embeds PKCS7 to PDF using SignatureAppearance and BinaryArrayOutputStream object stored in session. Now I have the signed PDF.
5 Server returns a response to the client and client shows a hyperlink to user get the signed copy of PDF.
My file size is too large and I don't want to store the above mentioned objects in session, what are other alternatives to achieve this ? Currently I am using IText 5.5.13.