PCL (HP) code:
<Esc>&a#P (#=180) Print Direction: 180 degree ccw rotation
Page Orientation
Designates the logical page position with respect to the physical page.
? & l # O
# = 0 - Portrait
1 - Landscape
2 - Reverse Portrait
3 - Reverse Landscape
Print Direction
Rotates the logical page coordinate system counterclockwise in 90 degree
increments with respect to the orientation of the current logical page.
? & a # P
# = Degrees of rotation (0, 90, 180, 270)
Many other printers including Richoh and Lexmark use PCL as well.
Orientation Commands Print Direction Commands