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

Programatically modifying a PDF with the Adobe SDK

kungman17
Registered: Nov 9 2007
Posts: 4

I'm writing a Java program that will hopefully be using the Adobe SDK to modify PDF documents. I have some things that I would like to do to PDF files and I'm not sure if the SDK will allow me to do this. Can you tell me if the following is possible, and maybe where I should start looking to implement this functionality?
 
I need to use a regular expression to search for text in a PDF document. If that regular expression matches anything, I need to display that matching text to the user, and allow them to edit it... sort of like a find and replace.
 
So I would first need to search for text in a PDF document, and upon finding that text, retrieve the location of it, possibly by getting the text's offset from the beginning of the file?
 
Then I would need to somehow display the block of text in the PDF to the user in a dialog, allow them to type something different in, and then find the location of the text that was previously found (possibly using an offset of some kind) and then replace that block of text with what the user typed.
 
Thanks in advance for the help.

My Product Information:
Acrobat Standard 8.0999999999999996447286321199499070644378662109375, Windows
dthanna
ExpertTeam
Registered: Sep 28 2005
Posts: 248
Via SDK? No. What you need is a full-fledged set of PDF library tools to do this. These are available, for a price, from Adobe (via Datalogic) and other, third parties.

When dealing with PDF libraries - (with one exception) you get what you pay for.

Douglas Hanna is a member of the Production Print Technology team at Aon.
www.aonhewitt.com

kungman17
Registered: Nov 9 2007
Posts: 4
Thanks for the help.

As an FYI to others who read this post, the Datalogics web site is [url=http://www.datalogics.com]http://www.datalogics.com[/url] and they have both a .NET and Java interface for their Adobe PDF library.