Acrobat Pro 9 "save as" error

Hi All,

Writing a script to open a PDF file extract a single page, then save that page back with an amended name. I’ve got some sort of Syntax error as Acrobat errors with my save code.

here is a portion of the main script to just open the file and resave (without the page extraction bit)

global PDF_file

global newfilepath

set PDF_file to choose file with prompt "where is the PDF file?"

set filename to name of (info for PDF_file)

tell application "Finder" to set PDFloc to container of PDF_file as text

set PDFloc to POSIX path of PDFloc

-- display dialog PDFloc

set filename to {"Delivery " & filename}

set newfilepath to PDFloc & filename as string

display dialog newfilepath

tell application "Finder"
	open document file PDF_file
end tell

tell application "Adobe Acrobat Pro 9"
	set mydoc to document 1
	tell mydoc
		save to POSIX file newfilepath
	end tell
	close document 1
end tell

This returns:
“Adobe Acrobat Pro 9 got an error: document "Test.pdf" doesn’t understand the save message.” number -1708 from document “test.pdf”

I read here ( that a POSIX path is required hence, the Posix path reference.

Nb. In the full script because the page is Extracted, It will not just “save” as the file doesn’t exist in a saved format. It always presents a dialog box requesting a file name.

Thanks in Advance.


Applescript : 2.1.2
Acrobat Pro 9 - v9.3.0
Mac OS : 10.6.7
MacPro : 8-core/8GB/1TB/5780 video.