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

Illustrator Scripting | Not have export option for EPS and PDF format in extend script & While doing Save As from extend script, it replaces the current project opened with saved as document.

New Here ,
Jun 06, 2019 Jun 06, 2019

We are actually facing 2 issues which is somewhat related for our functionality which we are providing in our zoom plugin,

  • There are no options of EPS and PDF in ExportType in exportFile function of current document in extend script.

          To overcome this we are using Save As for PDF and EPS.

  • While doing SaveAs on current document for option of EPS and PDF, the current document opened in Illustrator is getting replaced by the newly saved document from saveAs call, which is then affecting our overall functionality. And this is happening when we disable artboard in SaveAs options i.e. we are keeping "saveMultipleArtboards" as it's default value as false.

Sample of scripts we are using are as follows :

var saveOptions = new EPSSaveOptions();
saveOptions.embedAllFonts = embedFonts;
saveOptions.embedLinkedFiles = embedLinkedFiles;
if (useArtboards) {

  saveOptions.saveMultipleArtboards = true;
  if (!rangeStr || rangeStr === undefined || rangeStr === null)

  rangeStr = "";
  saveOptions.artboardRange = rangeStr;
  activeDocObj.saveAs(new File(fullPathToFile), saveOptions);

}

else {

  var outputFilePath = fullPathToFile + ".eps";
  var outputFile = new File(outputFilePath);
  if (outputFile.exists) {

  outputFile.remove();
   outputFile.close();
  }

  activeDocObj.saveAs(new File(outputFilePath), saveOptions);

}

Please suggest a solution for it as soon as possible.

TOPICS
Scripting
548
Translate
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
Adobe
Community Expert ,
Jun 06, 2019 Jun 06, 2019
LATEST

get a reference of your file before exporting, then after exporting, close the file and re open your original file.

Translate
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