Jelajahi Sumber

修改print3打印

zhenghao 1 tahun lalu
induk
melakukan
a88af798f0
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      app/src/main/java/com/naz/sdkdemo/MainActivity.java

+ 3 - 0
app/src/main/java/com/naz/sdkdemo/MainActivity.java

@@ -598,8 +598,11 @@ public class MainActivity extends BaseActivity {
             currentHeight = currentHeight-mFontHeight-mSpace*mPot;
             printer.text(currentHeight, mOffsetY*mPot, FNT_SIMPLIFIED_CHINESE, ROTATION_90, fontSizeMultiple,fontSizeMultiple, "余标:")
                     .text(currentHeight, mOffsetY*mPot+(5*mFontWidth), FNT_SIMPLIFIED_CHINESE, ROTATION_90, fontSizeMultiple,fontSizeMultiple, module.qty);
+            printer.text(currentHeight, (mPaperHeight-5)*mPot-getStrLength(module.roll_qr_code), FNT_SIMPLIFIED_CHINESE, ROTATION_90, fontSizeMultiple,fontSizeMultiple, module.roll_qr_code);
+            currentHeight = currentHeight-mFontHeight-mSpace*mPot;
             printer.text(currentHeight, (mPaperHeight-5)*mPot-getStrLength(module.now_date), FNT_SIMPLIFIED_CHINESE, ROTATION_90, fontSizeMultiple,fontSizeMultiple, module.now_date);
             printer.qrcode((mOffsetX-30)*mPot, (mPaperHeight-5-30)*mPot, TSPLConst.EC_LEVEL_H, 10, TSPLConst.QRCODE_MODE_MANUAL, TSPLConst.ROTATION_0, module.roll_qr_code);
+
             printer.print();
         }
     }