fix:优化模板获取以及html模板
This commit is contained in:
@@ -271,6 +271,10 @@ public class TemplateService {
|
||||
sharedContext.setInteractive(false);
|
||||
sharedContext.setDPI(256f);
|
||||
|
||||
// 使用系统默认字体,假设系统默认字体支持UTF - 8
|
||||
Font font = new Font(Font.DIALOG, Font.PLAIN, 20);
|
||||
graphics.setFont(font);
|
||||
|
||||
// 使用Dimension对象进行布局
|
||||
renderer.layout(graphics, dimension);
|
||||
renderer.render(graphics);
|
||||
|
||||
@@ -24,7 +24,11 @@ public class USBImagePrintServiceImpl extends BaseImagePrint implements ImagePri
|
||||
@Override
|
||||
public Pointer getHandle(String devName) {
|
||||
try {
|
||||
return AutoReplyPrint.INSTANCE.CP_Port_OpenUsb(devName, 1);
|
||||
Pointer pointer = AutoReplyPrint.INSTANCE.CP_Port_OpenUsb(devName, 1);
|
||||
if ( pointer == null ){
|
||||
throw new RRException();
|
||||
}
|
||||
return pointer;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
throw new RRException("获取USB句柄失败");
|
||||
|
||||
Reference in New Issue
Block a user