Copy link to clipboard
Copied
Hi there, I've been working for a few days on a complex Illustrator action that cuts a custom print file into smaller sections. I've had very little experience making custom actions, so it's been quite a headache. I'm in the homestretch, the last thing I need the action to do is run a script that exports each artboard to it's own .EPS file. I've been trying for hours to alter an existing script to fit my exact needs, but I have basically no idea what I'm doing. I would seriously appreciate any help I can get. I need a script that will export each Artboard within an open Document to a seperate .EPS File, ideally without leaving the contents left on the other artboards floating in empty space, which is what I'm currently getting when saving as .EPS files with Artboards. I need the script to save the .EPS files to a subfolder that the script creates within the open documents parent folder. My EPS export options can be default, the version will be Illustrator 2020 EPS. I hope that's enough information, if I lef tany specifics out, let me know, I'll keep an eye out for replies. Thank you in advance to anyone willing to proviode assistance!
Another version to save the EPS inside the subfolder
function exportFileAsEPS() {
var saveDoc = app.activeDocument;
if (saveDoc.path != "") {
var subFolder = Folder(saveDoc.path + "/EPS");
if (!subFolder.exists)
subFolder.create();
} else {
subFolder = Folder.desktop;
}
var artboardsLength = saveDoc.artboards.length;
var saveOpts = new EPSSaveOptions();
saveOpts.cmykPostScript = true;
saveOpts.embedAllFonts = true;
saveOpts.saveMultipleArtboards = true;
save
...
Copy link to clipboard
Copied
Hi,
Give it a try to following script.
function exportFileAsEPS(destFile) {
var newFile = new File(destFile);
var saveDoc = app.activeDocument;
var artboardsLength = saveDoc.artboards.length;
var saveOpts = new EPSSaveOptions();
saveOpts.cmykPostScript = true;
saveOpts.embedAllFonts = true;
saveOpts.saveMultipleArtboards = true;
saveOpts.artboardRange = "1-" + artboardsLength;
saveDoc.saveAs(newFile, saveOpts);
}
exportFileAsEPS('~/Desktop/'); //Provide path where you want to save the files
Above script will export all artboards of the document inside the Desktop folder.
Copy link to clipboard
Copied
Another version to save the EPS inside the subfolder
function exportFileAsEPS() {
var saveDoc = app.activeDocument;
if (saveDoc.path != "") {
var subFolder = Folder(saveDoc.path + "/EPS");
if (!subFolder.exists)
subFolder.create();
} else {
subFolder = Folder.desktop;
}
var artboardsLength = saveDoc.artboards.length;
var saveOpts = new EPSSaveOptions();
saveOpts.cmykPostScript = true;
saveOpts.embedAllFonts = true;
saveOpts.saveMultipleArtboards = true;
saveOpts.artboardRange = "1-" + artboardsLength;
saveDoc.saveAs(subFolder, saveOpts);
}
exportFileAsEPS();
Copy link to clipboard
Copied
Wow, this worked beautifully! Thanks so much for your time Charu, really fantastic work! Been struggling with this all day, and you just saaved me from any further agravation. Thanks again!
Copy link to clipboard
Copied
Great!. It helps you.