Copy link to clipboard
Copied
I want to implement a plug-in for Acrobat DC that will call a CSC (cloud consortium signature) web service in order to sign the pdf-s. The web service uses OAuth 2.0 for authentication. I don't know where to start from, any suggestions? Thanks!
Copy link to clipboard
Copied
Are you already familiar with these topics:
- PDF internal structure
- PDF signature mechanics
- C++ development
- Plug-in creation
- Connection to a web service?
Is this only for working with Acrobat, or do you have the eventual hope of working with the free Reader?
Copy link to clipboard
Copied
I just want to work in Acrobat. I have read the SDK documentation and tested all the samples plug-ins. I didn't find infos about connection to a web service, but the rest of them i have read in the documentation. Thank you. In short terms, i want to implement an plug-in that will act like a CSC client.
Copy link to clipboard
Copied
Connection to a web service is not part of the Acrobat API. You need to use another library or standard system APIs to do that.
Does the web service return certificates, or does it perform the actual signing of PDFs?
Copy link to clipboard
Copied
After the successful auth the web service will perform the signing and return the signed hash(es).
Copy link to clipboard
Copied
So do you need to send the actual PDF to the web service? I'm trying to get a handle on whether you can use the Acrobat signing features or whether you need to work outside it, perhaps even closing the file and editing it offline, then reopening it.
Copy link to clipboard
Copied
Only a hash of the document will be sent to the web service. Those are the full steps that i must follow:
// 01. The web client (my plug-in) sends a "oauth2/authorize" request to the MSign (the web service)
// 02. The MSign redirects the user to our authorization server to perform a login.
// 03. After the successful login the MSign selects the corresponding user and the corresponding qualified certificate.
// 04. The MSign creates the oauth authorization token and sends it back to the client.
// 06. The client sends a "oauth2/token" with the authorization token received in the previous step to the MSign
// 07. The MSign uses the authorization token for selecting the corresponding user (and qualified certificate), creates a oauth access token and sends it back to the client.
// 09. The client uses the access token to send a "credentials/list" request to the MSign.
// 10. With the access token the MSign identifies the corresponding user (and qualified certificate) and sends back the credential Ids for all qualified certificate (or only one qualified certificate).
// 11. The client receives the credentials Ids and successively calls "credentials/info" for each credential Id to in turn display a list of selectable qualified certificates.
// 12. After collecting the responses from the "credentials/info" calls the client displays the available qualified certificate(s) and the user selects the one he wants to use for signing.
// 13. The client uses the selected credential Id to send a "credentials/sendOTP" request to the MSign.
// 14. The client asks the user for the TAN (OTP) and the signature password and sends a "credentials/authorize" request containing the credential Id , the hash(es) of the document(s) to be signed, the signature password and the OTP to the MSign.
// 15. The MSign computes and sends back the SAD to the client.
// 16. The client receives the SAD and sends back the "signatures/signHash" request containing the credential Id, the SAD and the hash(es) of the document(s) to be signed.
// 17. The MSign sends back the signed hash(es) to the client.
// 18. The client interates the signed hash(es) in the signed document(s).
Copy link to clipboard
Copied
What you are asking about does not have anything to do with Acrobat. It could be written as a standalone program. Why do you want it to be a plug-in?
So, the Acrobat SDK won't help you. As TestScrn mentioned, you need to use library functionality for connecting to a web service. That's all you need.
Copy link to clipboard
Copied
It's a final project for my school, it must be an Acrobat Plug-in that does this. Can i use other librarys with the Acrobat SDK?
Copy link to clipboard
Copied
Yes, of course you can use other libraries within a plug-in. There are limitations, but it is up to you, the developer, to try out what you want to do and see how it works.
Actually you could do this using Acrobat JavaScript. It has an object for connecting to a web service. Here's the reference.
Copy link to clipboard
Copied
Thank you. I must create a button in acrobat and when i press it i will send the pdf hash for sign, something like that, can i achieve this with Acrobat javascript?
Copy link to clipboard
Copied
Read the documentation. With Acrobat JavaScript you can connect to a Web Service. You'll need to try it out and test whether or not it will work for your application.
Copy link to clipboard
Copied
Ok il try it out and il come back if i have problems. Thank you all !
Find more inspiration, events, and resources on the new Adobe Community
Explore Now