7 Replies Latest reply on Sep 25, 2016 6:22 AM by Peter Kahrel

    Playing with Zoom percentages! …

    Obi-wan Kenobi Adobe Community Professional

      Hi all,

       

      I have a document where all pages have different dimensions!

       

      E.g.: a 4-pages document,

      page 1 = 40 mm W  x 12 mm H;

      page 2 = 185 mm W  x 312 mm H;

      page 3 = 151 mm W  x 72 mm H;

      page 4 = 229 mm W  x 144 mm H.

       

      When I resize each page to window, I get different zoom-percentages!

      page 1 = 925%;

      page 2 = 82%;

      page 3 = 290%;

      page 4 = 172%.

       

      I would like to compare all the percentages and keep the smaller [82%] and apply this zoom to all the pages! 

       

      My beginning is:

       

      var myTarget = app.documents[0];
      
      
      for (i=0; i < app.layoutWindows.length; i++)
      {
      app.layoutWindows[i].zoom(ZoomOptions.FIT_PAGE) ;
      myZoom = myTarget.layoutWindows[i].zoomPercentage;
      ……
      }
      ……
      

       

                    

      I've no real idea about how finish this script!

       

      Thanks for your help!

       

      (^/)