1、前言(瞎扯) 有个需求:整一个给 Word 加水印的demo,于是我就网上找呗~ 看到那个 Aspose 好像是收费的,然后就把目光转向了 POI,看到各种形形色色的也不知道哪个能用。整了一会,自己拷贝出一个比较精简的能用的 demo 了。 2、人狠话不多,上效果图 我一般都是直接上图的,先看效果图(每一页都有的): 水印的分布如果不理想,只能小伙伴们自行研究调整了~ 3、人狠话不多,直接来代码 pom 依赖的版本不要改,修改版本可能会导致一些东西缺失 代码你们可以直接复制这里的使用 或者在码云仓库:点击这里跳转 3.2.1、pom 依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with import
Contact import, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack