Change page orientation in Lion

defaults write com.apple.print.PrintingPrefs UserDefaultPageFormat -dict-add com.apple.print.PageFormat.PMOrientation -integer 2

or using applescrip

do shell script “defaults write com.apple.print.PrintingPrefs UserDefaultPageFormat -dict-add com.apple.print.PageFormat.PMOrientation -integer 2″

the value after -integer can be 1,2 or 3:

1: Portrait

2: Landscape

3: Reversed landscape