Setting boolean property printer.landscape to true sets the printout in landscape mode. Otherwise printing happens in portrait mode.