orientation
Description (requires ScriptX v7 or later)
Specifies the page orientation for print-outs.
The orientation property is part of the basic freely-distributable printing subset.
When setting this property causes the orientation to change the margins are swapped, this behaviour is the same as when the orientation is changed within the Page Setup dialog but is different to the behaviour of the portrait property.
This is a read/write property. Use “portrait” to specify portrait orientation, any other value is taken as landscape.
Syntax
printing.orientation = "portrait" | "landscape"
Example
Check out the Basic Printing sample.