Is there a way to detect the orientation of every page in a pdf file?
I am creating an application that adds watermarks(text) to pdf files. These files can have pages portrait, landscape or a combination of both.
Using the doc.MediaBox property, I use the following logic below:
portrait = box.Height > box.Width
My problem is that, it is always returning a true value even on a landscape documents.