Acrobat Pro - Converting PDF to other formats

I have hundreds of PDF files that are mostly text, with multiple tables, that I need to convert to another format. XLS would be fine, XML could work, but I’m doing RTF, since that was in Adobe’s examples.

I gave up using the AppleScript save as command with a conversion and I’m trying to use do script with a Javascript command, but nothing seems to work.

The export works perfectly from the user interface.

Any suggestions?

Here’s the script I’m using

on open (fileList)
	repeat with thisFile in fileList
		set thisFile to thisFile as alias
		set newPath to thisFile as text
		tell application "Finder"
			set fileExtension to the name extension of thisFile
		end tell
		set AppleScript's text item delimiters to {"rtf", fileExtension}
		set newPath to (text items of newPath) as text
		set newPath to POSIX path of newPath
		
		tell application "Adobe Acrobat Pro"
			open thisFile
			tell document 1
				set mySaveAsScript to "this.saveAs(\"" & newPath & "\", \"com.adobe.Acrobat.rtf\");"
				do script mySaveAsScript
			end tell
			close document 1
		end tell
	end repeat
	
end open

try
com.adobe.acrobat.rtf
the conversion class is case sensitive.

:wink: