Creating a jpeg preview from Illustrator file that contains slices
I have an adobe add-on which uses the following extendscript snippet to generate a JPEG preview from an illustrator file.
var previewBasePath = "/Users/me/Desktop/";
var previewName = "testexport";
var type = ExportType.JPEG;
var saveOptions = new ExportOptionsJPEG();
saveOptions.artBoardClipping = true;
saveOptions.qualitySetting = 80;
saveOptions.horizontalScale = 200;
saveOptions.verticalScale = 200;
saveOptions.antiAliasing = true;
saveOptions.optimization = false;
var previewPath = previewBasePath + previewName + "_1.jpg";
var file = new File( previewPath );
app.activeDocument.exportFile(file, type, saveOptions);
However if the file contains "slices" it always outputs a folder full of files ( one for each slice ) which is not what I want.
If I action export from the FILE > EXPORT > EXPORT AS menu and use all of the default options, I get what I want which is a single jpeg.
Are there extra options for the jpeg export that control this or is there an alternative way to generate the JPEG?
Thanks in advance.
