getPdfFilePages method

Future<int> getPdfFilePages(
  1. String filepath
)

Get the page count of the specified pdf file. Available on Android 5.0 or later.

Implementation

Future<int> getPdfFilePages(String filepath) async {

  var params = {
    "printerId": mPrinterId,
    "printInfo": mPrinterInfo.toMap(),
    "filePath" : filepath
  };

  final int pages = await _channel.invokeMethod("getPDFFilePages", params);

  return pages;
}