3 Replies Latest reply on Aug 5, 2013 1:52 AM by [Jongware]

    [JS] CS5.5: Exporting EPS with Bleed Settings.- Reg

    Adobe-InDesign CS4 Level 1

      Dear All

       

      I'm having the doubt regarding for the exporting EPS with changing the bleed setting for while on-Fly process.

       

      Currently I'm using the below source code:

       

      //==================== Source Code ======================//

      var myDoc = app.activeDocument
      
      __DoEPSExportPreferenceSettings(myDoc)
      
       myEPSFileName = File(myDoc.filePath).fsName + "/"+ String(myDoc.name).split(".indd")[0]+(".eps");
       app.activeDocument.exportFile(ExportFormat.epsType, File(myEPSFileName));
      
      
      function __DoEPSExportPreferenceSettings(myDoc)
      {
               with(app.epsExportPreferences)
               {
                      pageRange = "1";
                      epsSpreads = false;
                      postscriptLevel = PostScriptLevels.LEVEL_3;
                      epsColor = EPSColorSpace.UNCHANGED_COLOR_SPACE;
                      preview = PreviewTypes.NONE
                      fontEmbedding = FontEmbedding.COMPLETE;
                      dataFormat = DataFormat.ASCII;
      
      
                        var BleedTopOffset = app.activeDocument.documentPreferences.documentBleedTopOffset;
                          var BleedBottomOffset = app.activeDocument.documentPreferences.documentBleedBottomOffset;
                          var BleedInsLeftOffset = app.activeDocument.documentPreferences.documentBleedInsideOrLeftOffset;
                          var BleedOutRightOffset = app.activeDocument.documentPreferences.documentBleedOutsideOrRightOffset;                    
         
                          
      
                      bleedBottom =32 + "pt";
                      bleedTop =  32 + "pt";
                       bleedInside =  32 + "pt";
                       bleedOutside =  32 + "pt";
                     
                      imageData = EPSImageData.ALL_IMAGE_DATA;
                      opiImageReplacement = true;
                      omitBitmaps = false;
                      omitEPS = false;
                      omitPDF = false;
                      appliedFlattenerPreset = "[High Resolution]";
                      ignoreSpreadOverrides = true;
              }
           
        }
      

       

      //==================== End : Source Code ======================//

      but unable to set the Bleed settings, while exporting as eps format.

      I mean the script is trying to change the bleed settings while using the "EPS ExportPreference settings", but unable to to exporting as EPS. [The output eps is without change the above mentioned 32pt settings in bleed].

       

      I'm checking all the possibilities. but unable to solve this proble.

       

       

      Please any one can give me the proper soultions, I will appriciate...

       

       

      Thanks in Advance

      T.R.Harihara SudhaN

        • 1. Re: [JS] CS5.5: Exporting EPS with Bleed Settings.- Reg
          Mac_rk Level 2

          try this

           

           

                            app.epsExportPreferences.bleedTop = BleedTopOffset

                            app.epsExportPreferences.bleedBottom = BleedBottomOffset

                            app.epsExportPreferences.bleedInside = BleedInsLeftOffset

                            app.epsExportPreferences.bleedOutside = BleedOutRightOffset

          • 2. Re: [JS] CS5.5: Exporting EPS with Bleed Settings.- Reg
            Adobe-InDesign CS4 Level 1

            Dear Mac_rk,

             

            Many thanks... I checked your code. But that also is coming wrong output.... I mean with out bleed only its exported... Please kindly look in to the below source code.

             

            I'm checking all the possibilities, but unable to solve this problem.

            could you please suggest me the proper solutions. I will appriciate  

             

            var myDoc = app.activeDocument

            __DoEPSExportPreferenceSettings(myDoc)

            myEPSFileName = File(myDoc.filePath).fsName + "/"+ String(myDoc.name).split(".indd")[0]+(".eps");
            app.activeDocument.exportFile(ExportFormat.epsType, File(myEPSFileName));


            function __DoEPSExportPreferenceSettings(myDoc)
            {

                            BleedTopOffset = parseInt(32) + "pt";

                            BleedBottomOffset = parseInt(32)  + "pt";

                            BleedInsLeftOffset = parseInt(32)  + "pt";

                            BleedOutRightOffset = parseInt(32)  + "pt";

                     with(app.epsExportPreferences)
                     {
                            pageRange = "1";
                            epsSpreads = false;
                            postscriptLevel = PostScriptLevels.LEVEL_3;
                            epsColor = EPSColorSpace.UNCHANGED_COLOR_SPACE;
                            preview = PreviewTypes.NONE
                            fontEmbedding = FontEmbedding.COMPLETE;
                            dataFormat = DataFormat.ASCII;

                             

                                           bleedTop = BleedTopOffset;

             

                                         bleedBottom = BleedBottomOffset;

             

                                         bleedInside = BleedInsLeftOffset;

             

                                         bleedOutside = BleedOutRightOffset; ; 

                  
                            imageData = EPSImageData.ALL_IMAGE_DATA;
                            opiImageReplacement = true;
                            omitBitmaps = false;
                            omitEPS = false;
                            omitPDF = false;
                            appliedFlattenerPreset = "[High Resolution]";
                            ignoreSpreadOverrides = true;
                    }
                
              }
            • 3. Re: [JS] CS5.5: Exporting EPS with Bleed Settings.- Reg
              [Jongware] Most Valuable Participant

              Why are you using parseInt?

               

              In the  reference on EPSExportPreference there is a note

               

              Note: Valid only when use document bleed to print is true.

               

              .. which is a bit opaque, to be honest. Check if your document setting actually has some bleed, and if it does, check if enabling PrintPreferences.bleedMarks makes it work/