@@ -62,11 +62,15 @@ public class PrintUtils {
if ("BAR_BATCHCODE".equals(printKey)) {
textFont = 7;
}
+ if (StringUtil.isEmpty(String.valueOf(fontSize))){
+ fontSize=1;
+ }
printHelper = printHelper.printText(printText)
+// .setTextAutLine("0","0",100,fontSize,false,false,printText)
.setX(printX)
.setY(printY + (int) ((0.6 * dpi) / 25.4))
- .setBold(2)
.setTextFont(textFont)
+ .setTextSize(fontSize)
.build();
break;
case "qrcode"://打印二维码
@@ -86,7 +86,10 @@ public class PrintHelper {
this.textSize = textSize;
return this;
-
+ public TextBuilder setTextAutLine(String x,String y,int width,int size,boolean isbole,boolean isdouble,String str) throws Exception {
+ HPRTPrinterHelper .AutLine(x,y,width,size,isbole,isdouble,str);
+ return this;
public TextBuilder setBold(int bold) {
if (bold < 0) {
bold = 0;