hi,
we are trying to add a Signature to a PDF, the PDF is generated, but it comes with a warning “at least 1 signature is invalid”. we cannot add the certificate to the trusted list.
The topic is very similar to At least one signature is invalid message - #3 by Jaehoon
After we first open the PDF, We performed following steps:
Untitled.png (4.6 KB)
-
Right Click over Signatures and goto Signature Properties
-
Press Show Signer Information button in popup
-
Noting happens
code
using (Document document = new Document(docStream))
{
using (PdfFileSignature signature = new PdfFileSignature(document))
{
Signature sing = new PKCS7Detached(@“c:\path\to*.pfx”, password);
signature.Sign(1, false, new System.Drawing.Rectangle(10, 10, 200, 200), sing);
// Save output PDF file
signature.Save(signedOutStream);
}
}