Photoshop save as PDF

I am trying to open an EPS in Photoshop using options, flatten it and save it as a PDF. I have the first two parts working, but I keep getting an error on the save command. If anyone could tell me what I am doing wrong, I would really appreciate it.

Please let me know if you have any questions.

Thanks in advance.


set x to choose file with prompt "Select EPS File"

tell application "Adobe Photoshop CS"
	set myOpenOptions to {class:EPS open options, resolution:300, mode:CMYK, constrain proportions:true}
	open x as EPS with options myOpenOptions
	set mySaveOptions to {class:PDF save options, quality:10}
	flatten current document
	save current document in file x as Photoshop PDF with options mySaveOptions appending lowercase extension
end tell

I found a couple things. First, in your save options, you have to say "JPEG quaity:10". Then, instead of saying: "save current document in file x… ", just say “save current document in x…” (no ‘file’).

Also, one suggestion I have is to specify the type of file you want to user to select, like this:

set x to choose file of type "EPSF" with prompt "Select EPS File"

Doing this will keep the select dialog from being cluttered with all the extra (including invisible) files.

Thank you for the info!

I know that this is off the subject, but do you know the “of file type” that I would use for an InDesign file? Is that info located somewhere in the dictionary?


InDesign CS file type is “IDd3”


I appreciate the info, but most of the file types seem pretty cryptic, which leads to two questions:

Where do you find this information other than on a user forum?

Why don’t they use something more logical, like the extension?

Yes they do. InDesign’s extension is .indd. If you don’t seet it go to Finder->Preferences->Advanced and select Show all file extensions.


Maybe I wasn’t clear. I know what the file extensions are, I was wondering why they wouldn’t use the extension as the file type. For example:

set x to choose file with prompt “Select InDesign File” of type {“indd”}

Other examples:
type “.txt” --for text
type “pdf” --for PDF
type “eps” --for EPS

I guess I don’t expect anyone to have a lo have a logical answer to this question, but I would really like to know where I would find this information when I need it? What documentation tells me that the file type for InDesign is “IDd3”? Is it in the dictionary? If so, where? If not, am I supposed to guess until I get it right? Do I post a question on a forum every time I need a simple question answered and risk getting scolded for not looking in the right place?

I apologize if my frustration is showing, but I am new to Applescript, I am trying to learn as much as I can as fast as I can and I would like to find these answers on my own, but often the answer is not where i would expect to find it.

The Macintosh OS does not need to rely on the file extension because of the file type and file creator of any file. Example, a text file could have a .txt extension but have been created with MSWord to the creator type and file type would be differant from a text file created with TextEdit. This would mean that although the file is simply a text file it will open with MSWord. Changing the creator type alone can have a differant application open the same file. Look in almost any scripting dictionary under the

class file: A file
creator type type class -- the OSType identifying the application that created the item

So in applescript:

choose file with prompt "Pick a file" of type {"TEXT"}

This would list only files that are regardless of thier extension.

This URL explains these issues and reason much better than I am able to here:

here is a way of getting the file types/creator type on this forum:

Thank you Brandon, I will give that a try!