Get Page Information in PSPDFKit Flutter PDF Viewer

PSPDFKit for Flutter version 3.10 introduces the ability to get page information from a PDF document, including the page size, rotation, and other properties. The getPageInfo() method is available in the PdfDocument class. This method returns a PdfPageInfo object that contains information about the page.

Here’s an example of how to get page information from a document:

  documentPath: documentPath,
  onDocumentLoaded: (pdfDocument) {
    final pageInfo = pdfDocument.getPageInfo(0);
        print('Page size: ${pageInfo.width} x ${pageInfo.height}');

PageInfo currently has limited properties compared to the native SDKs. We plan to add more properties in future releases.

For more details about how to get page information using PSPDFKit for Flutter, try our Catalog example project.