fix:修复单文件打印字段问题
This commit is contained in:
parent
85909ab1f8
commit
e36ffeb994
|
@ -58,7 +58,7 @@ public class RegisterServiceImpl implements PrintService {
|
|||
deletePathList[0] = filePath.toString();
|
||||
String[] filePathList = new String[(int) Math.ceil((double) height / MAX_HEIGHT)];
|
||||
// 对图片进行分块处理,当前台式打印机最大参数配置 宽度690,高度1200
|
||||
if ( height > 1200){
|
||||
if ( height > MAX_HEIGHT){
|
||||
try {
|
||||
// 读取输入图片
|
||||
BufferedImage originalImage = ImageIO.read(new File(filePath.toString()));
|
||||
|
@ -87,7 +87,7 @@ public class RegisterServiceImpl implements PrintService {
|
|||
e.printStackTrace();
|
||||
}
|
||||
}else {
|
||||
filePathList[0] = "LOGO" + filePath.toString();
|
||||
filePathList[0] = "LOGO1=" + filePath;
|
||||
}
|
||||
|
||||
LexMarkDTO lexMarkDTO = new LexMarkDTO();
|
||||
|
@ -101,8 +101,8 @@ public class RegisterServiceImpl implements PrintService {
|
|||
param.put("alignment", 0); // 对齐方式
|
||||
param.put("offsetX", 0); // x
|
||||
param.put("offsetY", 0); // y
|
||||
param.put("resolution", 1); // 媒介类型,当前为:打印缓冲区 + 弹出 + 剪纸
|
||||
param.put("mediaCtrl", 8); // 1\2\4\6\8打印的清晰度
|
||||
param.put("resolution", 8); // 1\2\4\6\8打印的清晰度
|
||||
param.put("mediaCtrl", 1); // 媒介类型,当前为:打印缓冲区 + 弹出 + 剪纸
|
||||
param.put("fields", StringUtils.join(filePathList, "&"));
|
||||
lexMarkDTO.setParam(param.toJSONString());
|
||||
LexMarkResultDTO<LexMarkResultDTO.Param> paramLexMarkResultDTO = thirdService.callDevice(lexMarkDTO, LexMarkResultDTO.Param.class);
|
||||
|
|
Loading…
Reference in New Issue