Spire破解 去头部水印 The document was created with Spire.PDF for Java

当使用Spire的产品的时候 会有头部的水印 
The document was created with Spire.PDF for Java
 


    /**
     * 去除第一行水印
     * @param filePath 原路径
     * @param filePathS 新路径
     */
    public void fileZh(String filePath,String filePathS) throws IOException {

        //将文档输入input流
        InputStream is = new FileInputStream(filePath);
        XWPFDocument document = new XWPFDocument(is);
        //Spire的产品 生成的文件会自带同步警告信息,这里来删除Spire产品的的警告信息
        document.removeBodyElement(0);
        //将文件流put到新的文件中
        OutputStream os=new FileOutputStream(filePathS);
        try {
            document.write(os);
            log.info("水印去除完成,文档生成成功");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值