2 Replies Latest reply on Jan 22, 2010 1:56 AM by penyfai

    export eps problem in Javascript

    penyfai Level 1

      Can anyone please tell me why the following script will run without error and produce an eps file that has a preview, but no content.

       

      var BleedSize = app.activeDocument.documentPreferences.documentBleedTopOffset;

      if(BleedSize == 5.0){

      var bleedmm = "5";

      }

      else if(BleedSize == 3.0){

      var bleedmm = "3";

      }

      else{

      var bleedmm = "0";

      }

      with(app.epsExportPreferences){

      appliedFlattenerPreset = "[High Resolution]";

      bleedBottom = bleedmm;

      bleedInside = bleedmm;

      bleedOutside = bleedmm;

      bleedTop = bleedmm;

      dataFormat = DataFormat.BINARY;

      epsColor = EPSColorSpace.CMYK;

      epsSpreads = true;

      fontEmbedding = FontEmbedding.COMPLETE;

      imageData = EPSImageData.ALL_IMAGE_DATA;

      omitBitmaps = false;

      omitEPS = false;

      omitPDF = false;

      opiImageReplacement = false;

      pageRange = "all pages";

      postscriptLevel = PostScriptLevels.LEVEL_3;

      preview = PreviewTypes.PICT_PREVIEW

      }

      //

      var myFile = new File("/Users/Techman/Desktop/myTestFile.eps");

      app.activeDocument.exportFile(ExportFormat.epsType, myFile, false);