7 Replies Latest reply on Aug 31, 2015 7:03 PM by adamg86737138

    Indesign: Export multiple groups as .eps

    adamg86737138

      I have a product catalogue that I've created in InDesign and now I need to update the website with the new product images. The product images are linked .eps files that have dimensions added to them using lines and text boxes for the numbers. This is all then grouped together and there are a couple hundred of these all up.

       

      The question is, is there a script that will export each individual group as an .eps file? So then I don't have to do it manually which would be a mammoth task.

       

      Any ideas would be appreciated!

      Adam

        • 1. Re: Indesign: Export multiple groups as .eps
          Vamitul Level 4

          Have you tried doing it manually? You will run into the nasty surprise that Indesign will only export eps from the full document page, not just one object.

          __LE:___

          you can do it as PNG's or JPG's etc.

          var doc=app.activeDocument;
          var links=doc.links.everyItem().getElements();
          var fd=new Folder(doc.fullName.parent+'/EPS');
          if(!fd.exists){
            fd.create();
          }
          var f;
          for (var i=0;i<links.length; i++){
            if ((links[i].status==LinkStatus.NORMAL||links[i].status==LinkStatus.LINK_EMBEDDED)&&
            links[i].parent instanceof EPS &&
            links[i].parent.parent.parent instanceof Group){
              f=File(fd.fullName+'/'+links[i].name);
              links[i].parent.parent.parent.exportFile(ExportFormat.PNG_FORMAT,f);
            }
          }
          
          • 2. Re: Indesign: Export multiple groups as .eps
            adamg86737138 Level 1

            Hi Vamitul,

             

            Thanks for this it works great! It even exports the file as the filename of the EPS which is an added bonus! Shame about not being able to export as EPS, not huge problem though as they would end up as PNG anyway really.

             

            There is one problem however: the file exports with the extension .eps. I have to change this to .png so it opens (which is what it's supposed to be?). Is there a fix for this?

            • 3. Re: Indesign: Export multiple groups as .eps
              adamg86737138 Level 1

              Don't worry, I've managed to fix it. Not sure if it's the best way to do this but it worked!

               

              Below is the edited script.

              var doc=app.activeDocument; 

              var links=doc.links.everyItem().getElements(); 

              var fd=new Folder(doc.fullName.parent+'/JPG'); 

              if(!fd.exists){

                fd.create();

              }

              var f; 

              for (var i=0;i<links.length; i++){

                if ((links[i].status==LinkStatus.NORMAL||links[i].status==LinkStatus.LINK_EMBEDDED)&& 

                links[i].parent instanceof EPS &&

                links[i].parent.parent.parent instanceof Group){ 

                  f=File(fd.fullName+'/'+links[i].name.replace(/.[^.]+$/,'')+'.jpg'); 

                  links[i].parent.parent.parent.exportFile(ExportFormat.JPG,f); 

                  app.jpegExportPreferences.jpegQuality = JPEGOptionsQuality.MAXIMUM; 

                  app.jpegExportPreferences.exportResolution = 1200; 

                }

              }

              • 4. Re: Indesign: Export multiple groups as .eps
                Vamitul Level 4

                Sorry about the eps extension. Like you, i just assumed that eps export would work, made the script and only after that i noticed the problem, but forgot to make the adjustment, but i see you managed to fix it (and you did it very well, i might add). Congrats.

                Just for the record, there is a way to get the script to export individual EPS:
                For each found Group,

                create a new document,

                set the bounds of the new document's page to the group's geometricBounds,

                duplicate the group to the new document,

                export Eps,
                close new document without saving.

                 

                ps. 1200  image resolution?? That's a biggy.

                • 5. Re: Indesign: Export multiple groups as .eps
                  Laubender Adobe Community Professional & MVP

                  Hi Adam,

                  I'd rather isolate the group you want to export to EPS than exporting to JPEG directly out of InDesign and do the rendering work with PhotoShop's superior JPEG functionality.

                  Like Vamitul already suggested.

                   

                  And on a second thought, PDF as export format will be the right choice for this. Opening a PDF (or an EPS) as Smart Object in PhotoShop would be the right thing to do, setting high resolution in PhotoShop if that would be the appropriate thing to do in your workflow and then using its "Save for Web" features (or not; depending on your workflow).

                   

                  Note 1: Also PDF exports do the whole page, so you could duplicate your group to a temp InDesign document, set the page size acording to the group's visible bounds and export from there.

                  One advantage: PDF is able to export live transparency with eg. PDF/X-4 export settings. And the whole thing will be flattened at a later stage than EPS will do it in the moment you export from inDesign.

                   

                  You can script PhotoShop out of InDesign with BridgeTalk. Search for that term here in the forum and some code samples will pop up.

                   

                  Note 2: And I also wonder about the "1200 ppi" statement. For web usage? Are you sure?

                   

                  Uwe

                  • 6. Re: Indesign: Export multiple groups as .eps
                    adamg86737138 Level 1

                    Hi guys,

                    Thanks for the further feedback.

                     

                    Just for the record, I made the resolution 1200 because at the time I thought it was not possible to export this way as vector at all, so I upped the resolution so I could use these for other applications as well. Even though the primary use will be web (did a batch through Photoshop to 72ppi).

                     

                    I know enough JS to get me out of trouble, but not enough to build scripts from scratch. So I'm at a loss when it comes to the solutions you put forward about isolating them and resizing artboards, etc.

                     

                    Thanks again!

                    • 7. Re: Indesign: Export multiple groups as .eps
                      adamg86737138 Level 1

                      Sorry to resurrect an old post, but are you able to create a script that does this for me? i.e. duplicates each group to a new document, resizes and exports as an EPS without saving?

                       

                      JPG was sufficient for me until now where EPS or other vector format would be ideal and a lot less hassle free.

                       

                      Would be great appreciated!