fix:修改默认图片渲染宽度高度
This commit is contained in:
@@ -46,14 +46,14 @@ public class ReceiptPrintRequest implements Serializable {
|
||||
private String templateFillData;
|
||||
|
||||
/**
|
||||
* 小票渲染宽度,默认为:600
|
||||
* 小票渲染宽度,默认为:690
|
||||
*/
|
||||
private Integer width = 600;
|
||||
private Integer width = 690;
|
||||
|
||||
/**
|
||||
* 生成的模板的高度,默认为:950
|
||||
* 生成的模板的高度,默认为:1200
|
||||
*/
|
||||
private Integer height = 950;
|
||||
private Integer height = 1200;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ public class MS439PrintServiceImpl implements MS439PrintService {
|
||||
|
||||
lexMarkDTO.setParam(param.toString());
|
||||
LexMarkResultDTO<LexMarkResultDTO.Param> paramLexMarkResultDTO = thirdService.callDevice(lexMarkDTO, LexMarkResultDTO.Param.class);
|
||||
thirdService.close("HtmPrinter");
|
||||
// thirdService.close("HtmPrinter");
|
||||
return paramLexMarkResultDTO;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,22 +48,22 @@ public class RegisterServiceImpl implements PrintService {
|
||||
lexMarkDTO.setDevName("ReceiptPrinter");
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("TimeOut", 30000);
|
||||
param.put("formName", "ReceiptForm");
|
||||
param.put("mediaName", "ReceiptMedia");
|
||||
param.put("alignment", 0);
|
||||
param.put("offsetX", 0);
|
||||
param.put("offsetY", 0);
|
||||
param.put("resolution", 1);
|
||||
param.put("formName", "ReceiptForm"); // 表单名从
|
||||
param.put("mediaName", "Blank"); // 媒介类型
|
||||
param.put("alignment", 0); // 对齐方式
|
||||
param.put("offsetX", 0); // x
|
||||
param.put("offsetY", 0); // y
|
||||
param.put("resolution", 1); //
|
||||
param.put("mediaCtrl", 1);
|
||||
param.put("fields", "LOGO=" + filePath);
|
||||
lexMarkDTO.setParam(param.toJSONString());
|
||||
LexMarkResultDTO<LexMarkResultDTO.Param> paramLexMarkResultDTO = thirdService.callDevice(lexMarkDTO, LexMarkResultDTO.Param.class);
|
||||
// 切纸
|
||||
// this.thirdService.cutPaper("ReceiptPrinter", "ControlMedia", 4);
|
||||
//this.thirdService.cutPaper("ReceiptPrinter", "ControlMedia", 4);
|
||||
|
||||
File file = new File(filePath.toString());
|
||||
// 检查文件是否存在
|
||||
if (file.exists() ) {
|
||||
if (file.exists()) {
|
||||
// 尝试删除文件
|
||||
if (file.delete()) {
|
||||
log.info("文件删除成功: " + filePath);
|
||||
@@ -74,7 +74,7 @@ public class RegisterServiceImpl implements PrintService {
|
||||
log.info("文件不存在: " + filePath);
|
||||
}
|
||||
|
||||
this.thirdService.close("ReceiptPrinter");
|
||||
// this.thirdService.close("ReceiptPrinter");
|
||||
return paramLexMarkResultDTO;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user