4 Replies Latest reply on Dec 7, 2014 3:41 AM by iskoaster

    Current page (not Document) width and height with JSX

    iskoaster

      Hi,

      I am trying to create a script that saves every page of the document and add its width and height to the name.

      So far I managed to get the dimensions of the document using:

       

      app.activeDocument.pages.documentPreferences.pageWidth;

      app.activeDocument.pages.documentPreferences.pageHeight;

       

      That's ok when all the pages in the document have the same dimensions (Document Preferences).

      However, when I use custom pages that does not work.

       

      I tried the code below but does not work either.


      for(i=0; i<nb;i++)

      {  

           app.activeDocument.pages[i].documentPreferences.pageWidth;

           app.activeDocument.pages[i].documentPreferences.pageHeight;

      }

       

      I have done some research and I don't seem to find any information regarding custom pages dimensions.

       

      Can you please help with this?

       

      Thanks in advance,

      Isko