c# - IronPdf - 签名图像未在数字签名的 PDF 中呈现

标签 c# digital-signature ironpdf

我想使用 IronPdf 生成一个带有签名图像的数字签名 pdf库,但我遇到了以下问题:

虽然对 pdf 进行了数字签名,但签名的图像似乎并未呈现/出现在生成的 pdf 中。

以上代码(我正在控制台应用程序中测试)基于:https://ironpdf.com/docs/questions/signing/ (第三种情况)

// Step 1. Create a PDF
ChromePdfRenderer Renderer = new ChromePdfRenderer();
using PdfDocument doc = Renderer.RenderHtmlAsPdf("<h1>Testing 2048 bit digital security</h1>");

// Step 2. Create a Signature.
// You may create a .pfx or .p12 PDF signing certificate using Adobe Acrobat Reader.
// Read: https://helpx.adobe.com/acrobat/using/digital-ids.html
var Signature = new IronPdf.Signing.PdfSignature("ChristosAsvestopoulos.pfx", "123abc!");

// Step 3. Optional signing options and a handwritten Signature graphic
Signature.SigningContact = "support@ironsoftware.com";
Signature.SigningLocation = "Chicago, USA";
Signature.SigningReason = "To show how to sign a PDF";
Signature.LoadSignatureImageFromFile("handwriting.png");

//Step 4. Sign the PDF with the PdfSignature. Multiple signing certificates may be used
doc.SignPdfWithDigitalSignature(Signature);

//Step 5. The PDF is not signed until saved to file, steam or byte array.
doc.SaveAs("signed.pdf");

注意事项:

.pfx 文件创建如下:https://helpx.adobe.com/acrobat/using/digital-ids.html

IronPdf 版本:2022.8.7894

操作系统:Windows 10 企业版

应用程序框架:.NET Core 3.1

对于 handwriting.png 文件我也尝试过(但没有成功):https://ironpdf.com/troubleshooting/digital-signatures/

最佳答案

我是 Iron Software 的 Vince。 这是一个关于签名的已知问题 - 数字签名中的图像不可见,并已得到 IronPDF 工程师的确认。它已记录到我们的开发团队。

我已将这篇文章链接到开发票,因此一旦在未来的更新中解决此问题,我们将与您联系并通知您。

您可以使用 Ticket# 54677 将跟进发送至 developers@ironsfotware.com。

关于c# - IronPdf - 签名图像未在数字签名的 PDF 中呈现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73235481/

相关文章:

javascript - -webkit-transform CSS 属性在 IronPdf 中不起作用

javascript - 如何将标签添加到Asp.net文本框?

c# - 如何在 C# 中从选定的 XML 节点获取所有属性名称

c# - Linq to SQL - SubmitChanges() - 检查插入是否成功

c# - 不带参数的 RSASSA-PSS 使用 SHA-256 .Net 4.5 支持

spring-security - PKIX 路径验证失败 : java. security.cert.CertPathValidatorException:签名检查失败

java - 需要签名的 Java JNLP 的目的是什么?

c# - 502 错误 : Bad Gateway on Azure App Service with IronPDF

c# - 使用ironPDF从HTML到PDF在AZURE WEBAPP中出现错误:- Error while deploying Chrome dependencies [Issue Code IRONPDF-CHROME-DEPLOYMENT-ERROR]

c# - Linq 无法从 'System.Collections.Generic.IEnumerable<string>' 转换为 'string[]'