小编Jav*_*ish的帖子

使用 itext 5.5.5 的数字签名

我从 iText 5.2.1升级到 iText 5.5.5

我使用 PdfStamper 和 PdfSignatureApperance 来应用数字签名。

这是我的代码片段。

PdfStamper stamper = PdfStamper.createSignature(reader, byteArrayOutputStream,'\0');
PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
appearance.setCrypto(key, chain, null, PdfSignatureAppearance.WINCER_SIGNED);
Run Code Online (Sandbox Code Playgroud)

从上面的代码中,有一些东西在当前版本中不存在。

1) 在iText 5.5.5版本中,我找不到 PdfSignatureApperance 类的“setCrypto”方法。

2) PdfSignatureApperance 不包含 WINCER_SIGNED。

如果有人可以帮助我使用新的替代方案应用数字签名。

谢谢。

pdf itext

6
推荐指数
1
解决办法
3175
查看次数

标签 统计

itext ×1

pdf ×1