Link to home
Start Free TrialLog in
Avatar of AndyPeers
AndyPeers

asked on

Programmatically Add Comment to PDF file.

Is there anyway to programmatically add a comment or a text field to a PDF file? I will eventually be doing this in a batch process on multiple PDF files.
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

There are at least two ways to do this with Acrobat:

You can create an Acrobat batch process (with Adobe Acrobat 6 Professional) and some JavaScript, and you can write a seperate application that uses Acrobat's APIs to add the form fields (e.g. a VB application that uses the VB/JavaScript bridge). I would go with the JavaScript solution, because it's much easier to do. You can e.g. process a directory full of PDF files in one operation. Please let me know if you need some more information for either one of these mechanisms.

In addition to this, you can also use a non-Adobe PDF librarry or toolkit to create these comments or form fields. Depending on your programming environment, there are several solutions available. If this is something that looks more interesting to you than the Acrobat solution, I can provide some pointers.
Avatar of AndyPeers
AndyPeers

ASKER

What I'm looking to do is a have a folder of files with the ID in the filename. I want to look the ID up in a CSV file then grab the data associated  with that ID and add it to the PDF format. I have Adobe Acrobat 6 Pro. I would prefer to do this in a VB app or C#. Where can i get a reference for the Acrobat API?
What I'm looking to do is take a folder of PDF files with the ID in the filename. I want to look the ID up in a CSV file then grab the data associated  with that ID and add it to the PDF file. I have Adobe Acrobat 6 Pro. I would prefer to do this in a VB app or C#. Where can i get a reference for the Acrobat API?
You can do this all in Acrobat's JavaScript (at least on a Windows machine): If you make your CSV file a datasource, Acrobat can access it's content via ADBC (this is Adobe's JavaScript wrapper around ODBC). You can get the API documentation on Adobe's web site. Unfortunately not everything is available to the general public. The "good stuff" is only available to ASN members, and this is $195 per year. You can however still get the Acrobat 5 SDK, and most of the information you can find in there is still valid:

http://partners.adobe.com/asn/tech/pdf/acrobatsdks.jsp
http://partners.adobe.com/asn/acrobat/download.jsp#fullinstall  (you can also find the JavaScript documentation on this page)
I'm unable to get any version of the SDK from adobe due to the ASN membership. Can you get me started in creating this script?
You need a free ASN web account to get the Acrobat 5 SDK, this is different from a full ASN membership. Try it again, and select to sign up for the web account.
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Whats needed to do this in VB?
Did you get the v5 SDK? For VB you need the SDK documentation and samples. In this case, it would actually be benefitilal to get the v6 SDK because it's documentation of this API is better than what came with v5.
It won't let me download the v5 SDK.
OK i got it!