Skip to main content
July 1, 2010
Question

saveAs option

  • July 1, 2010
  • 1 reply
  • 904 views

I open an eps file in Photoshop. I wanted to save this file as .eps after few modifications. If i pass the below statement i receive an error.

  phot_app.ActiveDocument.SaveAs(outFilename.ToString(), , , ".eps")

How to save an eps file opened in Photoshop as .eps?

regards,

Sashi

This topic has been closed for replies.

1 reply

Inspiring
July 1, 2010

app.activeDocument.saveAs(File,saveoptions,copy,ext)

File is a file object, not a string for a file name. You make it like this...

outFile = new File (outFilename.ToString());

saveoptions are the options you need specifically to save your file. Quality, compression, etc. You set them all into the save options object.

copy is either true or false depending on if you are saving as a copy or not.

ext you already got.

July 1, 2010

If i give the extenstion as .eps, i receive an error - 'Enumeration expected'

Inspiring
July 1, 2010

"Extensions" should be one of Extension.LOWERCASE, Extension.NONE, or Exension.UPPERCASE.
Or you can just not specify it. In all my years of scripting PS, I've never found the need to specify it.

This is described in the docs.

EDIT: Actually, these values are for JS. Check the VB docs for the actual values for VB.