Opening PDF in Photoshop

I’ve read several of the posts related to this topic and editied my scripts accordingly but I’m still having a difficult time getting the PDF to open with the desired options:

on open these_items
	repeat with i from 1 to number of items in these_items
			set this_item to item i of these_items
			set theFile to this_item as alias
			tell application "Adobe Photoshop CS2"
				set PDFOpenOptions to {class:PDF open options, crop page:trim box, name:(i as string), resolution:300, mode:grayscale, page:1, use antialias:yes, width:12, constrain proportions:true}
				open theFile as PDF with PDFOpenOptions
				do action "B&W Printout" from "Ad Proof Actions.atn"
			end tell
		on error the error_message number the error_number
			display dialog "ERROR: " & the error_number & ". " & the error_message buttons ("OK")
		end try
	end repeat
end open

Can anyone see what I’m doing wrong? I receive “error -1700 Can’t make some data into the expected type”. Any suggestions greatly appreciated!


two problems, i as string for the name will be a problem since it is looking for just a file name here not a path. I wouldn’t bother naming the document at this stage and wait till the save. The second is use antialias:yes which should be true not yes.

Thanks. Turns out most of the open PDF options aren’t even valid with CS2.

repeat with this_item in these_items
			tell application "Adobe Photoshop CS2"
				open this_item as PDF with options {class:PDF open options, resolution:300, mode:grayscale}

Many thanks again!