getPdfAsBase64 method

  1. @override
Future<String?> getPdfAsBase64({
  1. required String filePath,
  2. required String password,
})
override

Implementation

@override
Future<String?> getPdfAsBase64({
  required String filePath,
  required String password,
}) async {
  try {
    final String? base64String = await methodChannel.invokeMethod(
      'getPdfAsBase64',
      {'filePath': filePath, 'password': password},
    );
    return base64String;
  } on PlatformException catch (e) {
    if (kDebugMode) {
      print("Failed to get PDF as Base64: '${e.message}'.");
    }
    rethrow;
  }
}