David PHAM-VAN

Use pdfDpi on CPP lib

# Changelog
## 5.11.1
- Use pdfDpi on CPP lib
## 5.11.0
- Set Flutter 3.10 as the minimum version
... ...
... ... @@ -9,7 +9,7 @@ issue_tracker: https://github.com/DavBfr/dart_pdf/issues
screenshots:
- description: 'Printing a document on iOS'
path: example.png
version: 5.11.0
version: 5.11.1
environment:
sdk: ">=3.0.0 <4.0.0"
... ...
... ... @@ -102,12 +102,12 @@ bool PrintJob::printPdf(const std::string& name,
dm->dmPaperSize = 0;
if (width > height) {
dm->dmOrientation = DMORIENT_LANDSCAPE;
dm->dmPaperWidth = static_cast<short>(round(height * 254 / 72));
dm->dmPaperLength = static_cast<short>(round(width * 254 / 72));
dm->dmPaperWidth = static_cast<short>(round(height * 254 / pdfDpi));
dm->dmPaperLength = static_cast<short>(round(width * 254 / pdfDpi));
} else {
dm->dmOrientation = DMORIENT_PORTRAIT;
dm->dmPaperWidth = static_cast<short>(round(width * 254 / 72));
dm->dmPaperLength = static_cast<short>(round(height * 254 / 72));
dm->dmPaperWidth = static_cast<short>(round(width * 254 / pdfDpi));
dm->dmPaperLength = static_cast<short>(round(height * 254 / pdfDpi));
}
}
... ...