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

from document to string

vituperio
Registered: Dec 3 2007
Posts: 5

I have to questions?

1) is there a way to write a script (in a form) to open an other pdf form in Acrobat reader, and convert it into a string?

2) is there a way to write a script (in a form) to open a file (not pdf) in Acrobat reader, and convert it into a string?

Thanks

thomp
Expert
Registered: Feb 15 2006
Posts: 4411
What do you mean by "convert into a string"? Do you mean to convert the PDF or other type of file into a text file? Or do you want to capture certain text off of the documents?

There is a function in Acrobat JavaScript for grabbing the text off of a page, and it works in Reader. So at least this is possible.

Reader will not do any kind of file format translations, only Acrobat Pro or standard will do this.

In Reader you can use JavaScript to open another PDF, but not to open or save any other file type.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

vituperio
Registered: Dec 3 2007
Posts: 5
By "convert into a string" I mean capture the content of an other pdf and convert it in a string, so that I can elaborate it in a script.
What is the function in Acrobat Javascript for grabbing the text off of a page?
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Look up the "doc.getPageNthWord()" fucntion in the Acrobat JavaScript Reference. There is an example on how to use it.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script