'How to find whether PDF has landscape orientation or portrait

Are there tools to determine whether a PDF has landscape orientation or portrait?

I have currently looked upon pdfbox and Itext for this but seem that I could not find it. Please tell if they support this.

Extracting the PDF pages information using Origami is providing a information the pdf pages have rotation of some degree. Here is what Origami reports:

{:Parent=>#<PDF::Reader::Reference:0x872349c @id=8, @gen=0>, :Type=>:Page, 
 :Contents=>#<PDF::Reader::Reference:0x8722f24 @id=4, @gen=0>, :Resources=># <PDF::Reader::Reference:0x870dbd8 @id=2, @gen=0>, 
:MediaBox=>[0, 0, 612, 792], :Rotate=>270}

Rotate : 270

What does the 'rotation' actually mean?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source