# analyzeQualityOfDocument static method

Future<DocumentQualityAnalyzerResult> analyzeQualityOfDocument(

1. Page page, {
2. Size? analyzerImageSizeLimit,

})

Analyzes the quality of a document in the given `page`.

Optionally, limit the size of the analyzer image by `analyzerImageSizeLimit`.

## Implementation

    static Future<DocumentQualityAnalyzerResult> analyzeQualityOfDocument(
        Page page,
        {Size? analyzerImageSizeLimit}) async {
      try {
        var arguments = {'page': page.toJson()};
        var analyzerImageSize = {
          'height': analyzerImageSizeLimit?.height,
          'width': analyzerImageSizeLimit?.width
        };

        analyzerImageSizeLimit?.let(
            (self) => arguments["analyzerImageSizeLimit"] = analyzerImageSize);
        final value =
            await channel.invokeMethod('analyzeQualityOfDocument', arguments);
        return DocumentQualityAnalyzerResult.fromJson(jsonDecode(value));
      } catch (e) {
        Logger.root.severe(e);
        rethrow;
      }
    }