Get page information in the Nutrient Flutter SDK PDF viewer
Nutrient Flutter SDK retrieves page information from a PDF document, including page size and rotation. Call getPageInfo() on the document exposed by the controller, controller.document. The method returns a PageInfo object with information about the page. Refer to the Nutrient document interface(opens in a new tab) and page info(opens in a new tab) API references for details.
The following example gets page information from a document:
NutrientDocumentView( documentPath: documentPath, onControllerReady: (controller) { controller.events.documentLoaded.listen((_) async { final pageInfo = await controller.document.getPageInfo(0); print('Page size: ${pageInfo.width} x ${pageInfo.height}'); }); },)PageInfo exposes pageIndex, width, height, rotation, and label.
For more details about getting page information with Nutrient Flutter SDK, refer to the Catalog example project(opens in a new tab).