How can I detect a rotated pdf?

  • Hi,

    I've got a vertical pdf which is rotated 90º so it is viewed as landscape.
    In order to set viewer's initial zoom properly, I read the height and width of the document to determine if it is landscape or not. With this document I get height= 842 and width= 595 (vertical A4).
    Is there any way to know if the pdf is rotated?
    Is there any way to know if a document is landscape (rotated or not)?

    Thanks in advance