3 Replies Latest reply on May 3, 2017 7:46 AM by spaceheat

    Script to save as AI file with outlined type.




      I have had some success in altering the generic SaveAsPDF scripts that come with Illustrator to suit my PDF workflow. I would now like to take one of these scripts and turn it into one that will save an AI file with all of the type outlined.


      I am using the 2014 Java Scripting Guide, and have located this snippet, which is used to export to an Illustrator 8 file.


      function exportFileToAI (dest) {
         if ( app.documents.length > 0 ) {
            var saveOptions = new IllustratorSaveOptions();
            var ai8Doc = new File(dest);
            saveOptions.compatibility = Compatibility.ILLUSTRATOR8;
            saveOptions.flattenOutput = OutputFlattening.PRESERVEAPPEARANCE;
            app.activeDocument.saveAs( ai8Doc, saveOptions );


      Using this as a starting point, what would you suggest? I found convertTextToOutlines in PrintFlattenerOptions. Only thing is that I only want to outline the live type...


      Would it be something like...


      var flattenOptions = new PrintFlattenerOptions();
      flattenOptions.convertTextToOutlines = true