feat: There is no way the,

This commit is contained in:
super_liu
2021-11-11 12:47:45 +08:00
parent c333bd9e3e
commit 4b9b44f050
2 changed files with 8 additions and 8 deletions
@@ -49,18 +49,18 @@ public class WaterMarkUtil {
// set Transparency
PdfGState gs = new PdfGState();
// 设置透明度为0.2
gs.setFillOpacity(0.5f);
gs.setFillOpacity(0.4f);
under.setGState(gs);
under.restoreState();
under.beginText();
under.setFontAndSize(base, 25);
under.setFontAndSize(base, 36);
under.setTextMatrix(30, 30);
under.setColorFill(BaseColor.LIGHT_GRAY);
for (int y = 0; y < 10; y++) {
for (int x = 0; x < 8; x++) {
// 水印文字成45度角倾斜
under.showTextAligned(Element.ALIGN_LEFT
, waterMarkName, 100 + 300 * x, 300 * y, 45); }
, waterMarkName, 100 + 300 * x, 300 * y, 40); }
}
// 添加水印文字