1 Reply Latest reply on Mar 21, 2012 2:46 AM by Paul Riggott

    Bridge to create thumbnails from web application


      Hi all,


      I'm looking for a solution to create thumbnails on my web application server (eps, ai, psd.. files).

      Did you think that it a good idea (and possible) to use Bridge on a server (I have a licnese for InDesign server) to generate thumbnails with a jsx script ?




        • 1. Re: Bridge to create thumbnails from web application
          Paul Riggott Level 6

          I have no idea about using Bridge on a server, but here is an example of creating thumbnails.

          This example should be run from ExtendScript Toolkit, it will generate thumbnails for all (that it can)  filetypes in the selected folder.



          #target bridge
          var files = app.document.visibleThumbnails; 
          for(var a in files){
              if(files[a].type == "file"){
              var Thumb = new Thumbnail(files[a]);
              var orientation = Thumb.rotation;
              app.synchronousMode = true; 
              var bm = Thumb.core.thumbnail.thumbnail;
              app.synchronousMode = false;
              if(bm.width <1) continue;
              bm = bm.rotate(orientation);
              Name = decodeURI(Thumb.spec.name).replace(/\.[^\.]+$/, '');
              var target = new File(app.document.presentationPath + "/Thumb-" + Name + ".jpg" );