Get document page size with DynaPDF

How can I detect the document page size of a PDF file with DynaPDF or any other way?

When you import the PDF page, you can call EditPage() and then query it with GetPageWidth and GetPageHeight.

Or use GetBBox to query a DynaPDFRectMBS for the bounding box.

e.g.
dim r as DynaPDFRectMBS = pdf.GetBBox(pdf.kpbMediaBox)

or if you didn’t import the page, but the PDF is open you can do GetInBBox:

// open some PDF
call pdf.CreateNewPDF(nil)
call pdf.OpenImportFile(file, 0, "")

// query page size
dim bounds as DynaPDFRectMBS = pdf.GetInBBox(1, pdf.kpbMediaBox)