Compare commits
1
Commits
1.1.2
..
4c829f74a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4c829f74a9 |
@@ -89,8 +89,8 @@ android {
|
|||||||
applicationId = "com.yzx.kiosk"
|
applicationId = "com.yzx.kiosk"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 22
|
versionCode = 23
|
||||||
versionName = "1.1.2"
|
versionName = "1.1.3"
|
||||||
//multiDexEnabled = true
|
//multiDexEnabled = true
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ class PrinterService(
|
|||||||
) {
|
) {
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "PrinterService"
|
private const val TAG = "PrinterService"
|
||||||
|
|
||||||
|
// DNP BmpUtil 在 300 DPI 下会将 RX1 输入画布编码为 1844x1240 BMP。
|
||||||
|
// 1840x1240 仍是上层排版画布尺寸,不应用它校验 SDK 的最终文件头。
|
||||||
|
private const val RX1_ENCODED_BMP_WIDTH_300_DPI = 1844
|
||||||
|
private const val RX1_ENCODED_BMP_HEIGHT_300_DPI = 1240
|
||||||
}
|
}
|
||||||
|
|
||||||
private var mDnpPhotoPrint: DNPPhotoPrint? = null
|
private var mDnpPhotoPrint: DNPPhotoPrint? = null
|
||||||
@@ -274,10 +279,20 @@ class PrinterService(
|
|||||||
throw IOException("BMP 保存接口返回失败")
|
throw IOException("BMP 保存接口返回失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val expectedBmpWidth: Int
|
||||||
|
val expectedBmpHeight: Int
|
||||||
|
if (printId != PrintManager.EPrinter.QW410_DEF.id) {
|
||||||
|
expectedBmpWidth = RX1_ENCODED_BMP_WIDTH_300_DPI
|
||||||
|
expectedBmpHeight = RX1_ENCODED_BMP_HEIGHT_300_DPI
|
||||||
|
} else {
|
||||||
|
expectedBmpWidth = printSize.width
|
||||||
|
expectedBmpHeight = printSize.height
|
||||||
|
}
|
||||||
|
|
||||||
val validation = PrintImageIntegrityValidator.validateBmp(
|
val validation = PrintImageIntegrityValidator.validateBmp(
|
||||||
file = outFile,
|
file = outFile,
|
||||||
expectedWidth = printSize.width,
|
expectedWidth = expectedBmpWidth,
|
||||||
expectedHeight = printSize.height
|
expectedHeight = expectedBmpHeight
|
||||||
)
|
)
|
||||||
LogUtils.d(
|
LogUtils.d(
|
||||||
TAG,
|
TAG,
|
||||||
|
|||||||
Reference in New Issue
Block a user