function saveEPS( doc, saveFile ) { var saveOptions = new EPSSaveOptions( ); saveOptions.encoding = SaveEncoding.JPEGMAXIMUM; doc.saveAs( saveFile, saveOptions, true ); }