提交 f51db8fc authored 作者: hzh's avatar hzh

水印修复

上级 b0505567
...@@ -131,7 +131,7 @@ public class FileApproveServiceImpl extends AbstractBaseService<FileApproveVo, F ...@@ -131,7 +131,7 @@ public class FileApproveServiceImpl extends AbstractBaseService<FileApproveVo, F
watermarkFile = FileUtil.touch(FileUtils.addFolderBeforeFileName(originFile.getPath(), "watermark")); watermarkFile = FileUtil.touch(FileUtils.addFolderBeforeFileName(originFile.getPath(), "watermark"));
WatermarkConfig watermarkConfig = new WatermarkConfig.Builder() WatermarkConfig watermarkConfig = new WatermarkConfig.Builder()
.watermarkText(fa.getPurpose()) .watermarkText(fa.getPurpose())
.fontName("宋体") .fontName(fa.getPurpose().codePoints().anyMatch(c -> Character.UnicodeScript.of(c) == Character.UnicodeScript.HAN) ? "SimHei" : "Arial")
.color(Color.RED) .color(Color.RED)
.alpha(0.3f) .alpha(0.3f)
.angle(45) .angle(45)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论