There are two ways of rotating pages: (1) setting a value in the PDF file which asks the viewer (e.g. Acrobat) to rotate the page on-the-fly when viewing it (use -rotate or -rotateby) and (2) actually rotating the page contents and/or the page dimensions (use -upright afterwards or -rotate-contents to just rotate the page contents).
The possible values for -rotate and -rotate-by are 0, 90, 180 and 270, all interpreted as being clockwise. Any value may be used for -rotate-contents.
The -rotate operation sets the viewing rotation of the selected pages to
the absolute value given.
The -rotateby operation changes the viewing rotation of all the
given pages by the relative value given.
The -rotate-contents operation rotates the contents and dimensions
of the page by the given relative value.
The -upright operation does whatever combination of -rotate and -rotate-contents is required to change the rotation of the document to zero without altering its appearance.