getOptimizeOptions method
Reads the optimization options currently held by the native document.
The returned instance is a copy: mutating it does not change the native state. Pass the options you want to run with to optimizeToFile instead.
Since v3.2.0
example:
final options = await document.getOptimizeOptions();
debugPrint('image quality: ${options.imageQuality}');
Implementation
Future<CPDFOptimizeOptions> getOptimizeOptions() async {
try {
final result = await _channel.invokeMethod('get_optimize_options');
if (result is Map) {
return CPDFOptimizeOptions.fromJson(result);
}
return const CPDFOptimizeOptions();
} on PlatformException catch (e) {
throw CPDFOptimizeException(e.code, e.message ?? '');
}
}