openDocument static method

void openDocument(
  1. String document, {
  2. String? password,
  3. CPDFConfiguration? configuration,
})

Enter the local PDF file path, document password (if required), and configuration parameters, and display the PDF document in a new window.

for Samples:

ComPDFKit.openDocument(
    'xxx/compdfkit.pdf',
    password : '',
    configuration:CPDFConfiguration())

Implementation

static void openDocument(String document,
    {String? password, CPDFConfiguration? configuration}) async {
  await _methodChannel.invokeMethod('openDocument', <String, dynamic>{
    'document': document,
    'password': password,
    'configuration': configuration?.toJson()
  });
}