horizontalResolution property
Horizontal Resolution of an image
//Creates a new PDF document.
PdfDocument doc = PdfDocument();
//Create a PDF image instance.
PdfImage image = PdfBitmap(imageData);
//Gets horizontal resolution
double horizontalResolution = image.horizontalResolution;
//Draw the image.
doc.pages
.add()
.graphics
.drawImage(image, Rect.fromLTWH(0, 0, 100, 100));
//Saves the document.
List<int> bytes = doc.save();
//Dispose the document.
doc.dispose();
Implementation
@override
double get horizontalResolution => _horizontalResolution;