initializePdfRenderer method
Initializes the PDF renderer instance in respective platform by loading the PDF from the specified path.
Implementation
@override
Future<String> initializePdfRenderer(
Uint8List documentBytes, String documentID) async {
Settings documentData = Settings()..data = documentBytes;
final documentLoader = PdfJs.getDocument(documentData);
final PdfJsDoc pdfJsDoc =
await promiseToFuture<PdfJsDoc>(documentLoader.promise);
final int pagesCount = pdfJsDoc.numPages;
_documentRepo[documentID] = pdfJsDoc;
return pagesCount.toString();
}