• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Could someone help me with a script that exports artboards to .EPS files in a subfolder? Please!

Community Beginner ,
Feb 18, 2021 Feb 18, 2021

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! 

TOPICS
Scripting

Views

333

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 18, 2021 Feb 18, 2021

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
...

Votes

Translate

Translate
Adobe
Community Expert ,
Feb 18, 2021 Feb 18, 2021

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. 

Best regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2021 Feb 18, 2021

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();

 

Best regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 18, 2021 Feb 18, 2021

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 18, 2021 Feb 18, 2021

Copy link to clipboard

Copied

LATEST

Great!. It helps you.

Best regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines