Trying to Save as Adobe PDF from Pages

I have Adobe Acrobat PRO installed on my system.

I have a bunch of Pages documents that I want to print as PDF but not using the PDF function provided by MacOS Quartz but rather to print using the “Save As Adobe PDF” function that is on the “PDF” dropdown menu on the Print dialog.

I have this script that is almost there…

on run {input, parameters}
	repeat with theFile in input
		tell application "Finder"
			set theFilesFolder to (folder of theFile) as text
		end tell
		tell application "Pages"
			set theDoc to open theFile
			set theDocName to name of theDoc
			set theName to (characters 1 thru -7 of theDocName) as text
			print theDoc with properties {target printer:"Adobe PDF 8.0"}
			close theDoc
		end tell
	end repeat
	return input
end run

The line

			print theDoc with properties {target printer:"Adobe PDF 8.0"}

is what is missing. MacOS apparently does not have a PDF printer, so this line is ignored. What line I put there to make pages use Adobe Acrobat to print that PDF with ultra quality for print 300 dpi?

The option you want is using the Save as Adobe PDF Automator action.So you can probably do what you want as an Automator workflow.

What is the syntax I should use?

I suspect you’re going to have to go into Automator and build a workflow. If you save it as an application, you may not need any other code – just drag-and-drop.

unfortunately I need to do this with applescript only.

Thanks anyway.

You can use do shell script to run it from AppleScript.