Skip navigation
Currently Being Moderated

To find Landscape page

Jul 1, 2012 11:54 PM

Hi,

 

          How to find landscape pages???

 

Thanks in advance...

 
Replies
  • Currently Being Moderated
    Jul 2, 2012 2:01 AM   in reply to Cenchen

    Hi EyenanC,

     

    Please try the below JS code is alert this Document is Portrait or Landscape only.

     

     

    alert(app.activeDocument.documentPreferences.pageOrientation);
    

     

    thx

    csm_phil

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 2, 2012 2:48 AM   in reply to csm_phil

    @cms_phil – this is only good for the ordinary InDesign CS4 or CS3 file. In CS5 and above you could mix "landscape" and "portrait" oriented pages in one single InDesign document.

     

    For CS5 and above you have to loop through all pages and check width and height to calculate the orientation. I'm not sure that is enough, because you can do a lot of different transformations to a specific page that will affect the orientation of output (e.g. exported PDF files).

     

    See what scripting can also do with CS4 files (and their spreads) regarding transformation:

    http://www.indiscripts.com/post/2011/08/transforming-spreads-in-indesi gn-cs4-cs5


    Uwe

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points