Hi there,
Thanks for your inquiry. PageInfo property is only used for new PDF document. To know the page orientation you need to get page dimensions and compare width and height.To get page dimension please check following code snippet and compare the width and height, hopefully it will help you to accomplish the requirements.
Document doc = new Document(myDir + “input.pdf”);
foreach (Page page in doc.Pages)
{
// In order to take into consideration page rotation parameter
Aspose.Pdf.Rectangle rect = page.GetPageRect(true);
Console.WriteLine(“Page {0} width is {1} and heigth is {2}, rotation: {3}, size considering rotation: width {4} : height {5}”,
page.Number, page.Rect.Width, page.Rect.Height, page.Rotate.ToString(), rect.Width, rect.Height);
}
Moreover, please note Aspose.Pdf uses point as the basic unit, where 1 inch = 72 points and 1 cm = 1/2.54 inch = 0.3937 inch = 28.3 points.
Please feel free to contact us for any further assistance.
Best Regards,