11
This commit is contained in:
1 parent
eaec48a95b
commit
6a9dbf9080
3 files changed
+48
-7
No files matched your search
@@ -113,17 +113,22 @@ Future<void> pavoPrintSync({
|
||||
}
|
||||
final printer = printers.first.toNativeUtf16();
|
||||
try {
|
||||
final frontImg = CardImage.fromDataUrl(frontColor);
|
||||
// Windows Pavo 直打方向校准(2026-09-23 实测):纵向位图 + byOrientation=1 会被
|
||||
// SDK 旋转 90° 且锚定错位;统一预旋转成 1014×642 横向位图后按 byOrientation=2 打印。
|
||||
// 旋转方向常量见 card_image.dart 的 pavoPortraitRotateClockwise(测试卡校准)。
|
||||
final frontImg = CardImage.fromDataUrl(frontColor).toLandscape();
|
||||
final frontBgr = frontImg.toBgr24();
|
||||
final Uint8List? frontKGray =
|
||||
frontK != null && frontK.isNotEmpty ? CardImage.fromDataUrl(frontK).toGray8() : null;
|
||||
final Uint8List? frontKGray = frontK != null && frontK.isNotEmpty
|
||||
? CardImage.fromDataUrl(frontK).toLandscape().toGray8()
|
||||
: null;
|
||||
final Uint8List? backBgr;
|
||||
final Uint8List? backKGray;
|
||||
if (backColor != null && backColor.isNotEmpty) {
|
||||
final backImg = CardImage.fromDataUrl(backColor);
|
||||
final backImg = CardImage.fromDataUrl(backColor).toLandscape();
|
||||
backBgr = backImg.toBgr24();
|
||||
backKGray =
|
||||
backK != null && backK.isNotEmpty ? CardImage.fromDataUrl(backK).toGray8() : null;
|
||||
backKGray = backK != null && backK.isNotEmpty
|
||||
? CardImage.fromDataUrl(backK).toLandscape().toGray8()
|
||||
: null;
|
||||
} else {
|
||||
backBgr = null;
|
||||
backKGray = null;
|
||||
@@ -136,7 +141,7 @@ Future<void> pavoPrintSync({
|
||||
frontK: frontKGray,
|
||||
backBgr: backBgr,
|
||||
backK: backKGray,
|
||||
isLandscape: frontImg.isLandscape,
|
||||
isLandscape: true,
|
||||
copies: copies,
|
||||
);
|
||||
} finally {
|
||||
|
||||
Reference in new issue
Block a user