I realize that Adobe Acrobat Pro is limited in its scripting capabilities, but there must be a way!
I can - manually - save as text, and get a txt-file with all the text that’s in the PDF.
But I’m hoping to get that text in a variable instead, so I can search through it and get the 13-digit number that precedes the string “cc” and then save the PDF to the name <13-digits>.pdf.
This will get the text of the front open PDF file in Acrobat.
set theJava to ("var p = this.pageNum;
var n = this.getPageNumWords(p);
var str = \"\";
for(var i=0;i<n;i++) {
var wd = this.getPageNthWord(p, i, false);
if(wd != \"\") str = str + wd;}")
tell application "Adobe Acrobat Pro"
set theText to (do script theJava)
end tell
Model: iMacintel
AppleScript: xCode 3.0
Browser: Safari 525.20.1
Operating System: Mac OS X (10.5)