fix(barcode): 调整二维码标签尺寸及相关样式
- 将二维码图片生成宽度从480调整到600像素 - 修改HTML模板中页面尺寸为600x400像素 - 相应调整body和table的宽高为600x400像素 - 增加带边框div的内边距为18像素 - 调整二维码图片尺寸为240x240像素 - 提升标签字体大小至16pt以增强可读性
This commit is contained in:
parent
6b273ded7f
commit
22075e0f63
|
|
@ -333,7 +333,7 @@ public class BarcodePrintingController extends BaseController {
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@ public class InProduceOrderController extends BaseController {
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ public class InProduceOrderSurplusController extends BaseController {
|
||||||
// break;
|
// break;
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ public class NormalOrderController extends BaseController {
|
||||||
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
String html = ThymeleafUtil.generator("/template/qrcode/", "dp-1-label", ".html", variables);
|
||||||
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
ZipEntry entry = new ZipEntry(it.getPrintNo() + ".png");
|
||||||
zos.putNextEntry(entry);
|
zos.putNextEntry(entry);
|
||||||
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 480);
|
byte[] imageBytes = HtmlToImageUtil.convertToPng(html, 600);
|
||||||
zos.write(imageBytes, 0, imageBytes.length);
|
zos.write(imageBytes, 0, imageBytes.length);
|
||||||
zos.closeEntry();
|
zos.closeEntry();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue