fix(barcode): 调整二维码标签尺寸及相关样式

- 将二维码图片生成宽度从480调整到600像素
- 修改HTML模板中页面尺寸为600x400像素
- 相应调整body和table的宽高为600x400像素
- 增加带边框div的内边距为18像素
- 调整二维码图片尺寸为240x240像素
- 提升标签字体大小至16pt以增强可读性
This commit is contained in:
曹鹏飞 2025-12-22 14:48:39 +08:00
parent 6b273ded7f
commit 22075e0f63
5 changed files with 17 additions and 16 deletions

View File

@ -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();
} }

View File

@ -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();
} }

View File

@ -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();
} }

View File

@ -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