Get page information in Nutrient Flutter SDK PDF viewer
Nutrient Flutter SDK 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:
PspdfkitWidget( 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 Nutrient Flutter SDK, try our Catalog example project.