exportAsImage method
Exports the specified page to an image format defined by exportFormat
.
var resultImagePath = await PdftronFlutter.exportAsImage(1, 92, ExportFormat.BMP);
Returns the absolute path to the resulting image.
pageNumber
is 1-indexed, and the page is taken from the currently open
document in the viewer. The image's resolution is determined by the value
of dpi
. exportFormat
is given as one of the ExportFormat constants.
Implementation
Future<String?> exportAsImage(
int? pageNumber, int? dpi, String? exportFormat) {
return _channel.invokeMethod(Functions.exportAsImage, <String, dynamic>{
Parameters.pageNumber: pageNumber,
Parameters.dpi: dpi,
Parameters.exportFormat: exportFormat
});
}