openDocument method

Future<void> openDocument(
  1. String document, {
  2. String? password,
  3. Config? config,
})

Opens a document in the viewer with configurations.

Uses the path specified by document. Takes a password for encrypted documents, and config for viewer customization.

Implementation

Future<void> openDocument(String document,
    {String? password, Config? config}) {
  return _channel.invokeMethod(Functions.openDocument, <String, dynamic>{
    Parameters.document: document,
    Parameters.password: password,
    Parameters.config: jsonEncode(config)
  });
}