in reply to Determining a PDF's orientation

I know this is an unsophisticated solution, but you can take advantage of the fact that usually in portrait documents the "x" dimension is smaller than "y" ; in landscape documents the reverse is true.

So by comparing "x" with "y" you can get a rough estimate of whether the document is in portrait or landscape mode.

Hope I understand your problem correctly.

Replies are listed 'Best First'.
Re^2: Determining a PDF's orientation
by friedo (Prior) on Aug 21, 2005 at 21:32 UTC
    That is one thing I have considiered, though it is unreliable, unfortunately. The PDFs in question come in all sorts of bizarre sizes and some are bound to be wider than they are tall, but still in "portrait" mode according to the PDF. Thanks for the suggestion, though.