PDFの用紙サイズ

PDFの用紙サイズを取得できるメソッドは用意されていますか?

@kenable811
There is a way to indirectly determine the approximate size and orientation of the page by the size of the MediaBox of the page.
To reliably determine the orientation of the page, use the MediaBox property of the page.
If the width there is less (or equal) than the height, the page has a portrait orientation, otherwise landscape.
Page sizes can be determined using UserUnit (if specified) and MediaBox.Width , MediaBox.Height

using (FileStream fs = new FileStream("c:/pdftest/Mixed+Orientation.pdf", FileMode.Open))
using (Document document = new Document(fs))
{
    foreach (Page page in document.Pages)
    {
        var pageMediaBox = page.MediaBox;
        var isLandscape = pageMediaBox.Width > pageMediaBox.Height; // reliably determined.

        double userUnit = 72.0; // pixels per inch
        if (page.EnginePage.PageInformation.UserUnit != null)
        {
            userUnit = 72.0 * page.EnginePage.PageInformation.UserUnit.ToDouble();
        }

        double k = 25.4 / userUnit;
        var pageWidth = k * pageMediaBox.Width;
        var pageHeight = k * pageMediaBox.Height;

        Console.WriteLine("Height: " + pageHeight + ", Width: " + pageWidth + ", Landscape: " + isLandscape);
    }
}