These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

How to sign pdf from external application

Speak
Registered: Feb 13 2009
Posts: 12

Hello,

I’m looking for the method to sign a PDF file from external application.
First I looked for a library. But actually I’m trying to do this work with the tools of Adobe SDK.

I use the actual version of acrobat reader and adobe SDK (version 9).

I would sign a document without acrobat reader running.
I prefer not include a plug-in. That’s it will run with the default Adobe Reader’s installation.

I’m reading that is possible call a piece of JavaScript from C++ o Visual Basic with the “AFExecuteThisScript” function.
I hope that it will be a good solution, but I’m not sure.

Another solution may be use the API Headers (SDK 9) to make Plug-ins for make my application?
Can I use PubSec or DigSig to make a digital signature from a program? Not included in Acrobat Reader!

It is another solution that I found: (Unfortunately for the version 5.05 of Acrobat Reader and I’m not sure that it will run well)
http://support.adobe.com/devsup/devsup.nsf/docs/52126.htm

At the moment I not want use Adobe LifeCycle for this work.

If you was involved with a similar project or have a product, please contact me.
Thank you.

Jesús

_________________________________________________________
For more information about the project:

SPECIFICATIONS OF OUR PROJECT:

We need to make an ActiveX program to enable our customers sign PDF before upload it.
The ActiveX program have to run through the web browser, so We are looking for a small DLL (Without dependences with .NET Framework or Java virtual Machine), it have to run own-self. It will have to add one or multiple digital signature at PDF file. The digital ID could be stored in a token device or in the store of windows. So, the library will have to "speak" with the csp (Certificate Service Provider) to sign the certificate.
I could use the CAPICOM to allow our customers select a certificate from a pop-up window. Then I need your product: For example a method or function that with INPUT
(1) PDF file to sign
(2) An ID of the certificate selected by the user.
Then result will be the "Input PDF file" with the digital signature added.

If you have this product, we are interested!
Regards!
_________________________________________________________

My Product Information:
Reader 9.0, Windows
Speak
Registered: Feb 13 2009
Posts: 12
Hello again. I haven't solved my target.
I hope your help "like a fresh wather".
I post this new information to involve you in my project.
Thank you!

Jesús




______________________________________________________________
//////////////////////////////////////////////////////////////




I would like share the answers that I collected from the different forums.
I hope that this information will be useful for the developers that need make a similar project.
When I find a good solution, I would like share with you.
Thank you people!

Jesus.
______________________________________________________________
//////////////////////////////////////////////////////////////




______________________________________________________________
Question
--------------------------------------------------------------
I would like sign a PDF from external application.
After try a lot of libraries I thought that a good option may be use the Adobe SDK to make a Plug-In.
But I not want open the Acrobat Reader. Is possible use my Plug-in like a library (DLL)?
I prefer not install the plug-in, only make calls to it for add the sign.

I'm using Adobe Reader 9 and Adobe SDK 9.

Have a better idea?
______________________________________________________________
______________________________________________________________
Answer
--------------------------------------------------------------
No, you can not. The whole point of a plugin to Reader (or Acrobat) is that Reader/Acrobat is the user interface that drivers the plugin.
If you only want the “guts” of Acrobat/Reader, but not the UI, then we sell our Adobe PDFLibrary that you could license.
____________________________________________________________________________________________________________________________
Question
--------------------------------------------------------------
So I need to have the Adobe Reader running to use plug-ins... :(

Unfortunately I read at (http://www.adobe.com/devnet/pdf/library/) that PDFLibrary can do a lot of things but it can't sign PDFs.

I had read that another option is use the method "AFExecuteThisScript" that allow to call a Java Script program from a C++ program. With JavaScript I could be manipulate the PDF file without the Adobe Reader running.


ABSTRACT OF OUR PROJECT: I would need a small library to sign a PDF from a certificate stored at Windows store or security token. So the library need dialog with the CSP of Windows. This library have to support: Multi-sign, be independent of JVM or .NET Framework. The goal is embed it into an ActiveX to allow our custumers add digital signature through the internet browser.
______________________________________________________________
______________________________________________________________
Answer
--------------------------------------------------------------
You can use the PDFLibrary to sign PDFs – it just doesn’t have everything as easy as Acrobat/Reader. Of course, remember that Reader can ONLY sign PDFs that are “reader enabled”…
AFExecuteThisScript is for plugins to use – so you still need Reader.
You are correct. I am not aware of any 3rd party libraries that meet all of your qualifications. Perhaps you will need to write some additional code…
_______________________________________________________________