var savefile=new File("~/Desktop/exp.svg"); var exportOptions = new ExportOptionsWebOptimizedSVG(); exportOptions.svgMinify = true; app.activeDocument.exportFile(savefile, ExportType.WOSVG, exportOptions);