首页 > 知识问答文章正文

Java 删除PPT幻灯片中的数字签名

知识问答 2022-02-14 19:15:39 admin

针对PPT幻灯片中已有的数字签名,若想删除来添加签名可参考以下方法来实现如何删除。

工具/材料

IntelliJ IDEA 2018

PowerPoint 2013

JDK 1.8.0

spire.Presentation.jar 4.3.2

操作方法

【步骤01】

源文档准备:准备一个已签名的PPT幻灯片文档,如图:

【步骤02】

在IDEA程序中一入spire.presentation.jar,

【步骤03】

键入如下代码:
import com.spire.presentation.*;

public class RemoveSignature {
public static void main(String[] args) throws Exception {
//加载PPT文档
Presentation ppt = new Presentation();
ppt.loadFromFile("AddSignature.pptx");

//判定文档是否签名
boolean digitalSigned = ppt.isDigitallySigned();
if (digitalSigned == true)
{
ppt.removeAllDigitalSignatures();//移除签名
}

//保存文档
ppt.saveToFile("RemoveSignature.pptx",FileFormat.PPTX_2013);
ppt.dispose();
}
}

【步骤04】

完成代码 后,运行程序,生成结果文档,在结果文档中可查看数字签名删除情况,如图,原有签名已成功删除:

标签:

发表评论

评论列表

可盼网Copyright @ 2011-2024 All Rights Reserved. |版权所有 备案号: 豫ICP备2022006457号-8