Resolved Digitally sign PDF files

Solution






 
Solution
Well that's your fault for not stating how many pages are required to be signed. I'm not a mind reader.

That's why you should be clear from the start what your requirements are and be as descriptive as possible.

Also, there are other examples I have provided you above. I suggest you dig into those articles and check the published source code within.

X509 costs nothing.
 
Correct me if I'm wrong, but their website doesn't say anything that I've seen about signing the pdf after creation : http://pdfsharp.net/Features.ashx ???

Look up self-signed certificate using Bouncy Castle in C#. You will find a lot of coverage on X509 which most of these libs use.
 
My reading of the link in post #6 is that the pilot request was not going to be merged in by the PDF Sharp team, and that others trying out the pull request where getting varying levels of success.
 
Yep (y) and if you look on their official website on #7, it doesn't say anything about signing directly. However, most people on the net are recommending iTextSharp, and they've had success using it.

But if the OP has found that this it the direction they want to go, so be it. Guess it's safe to mark this one resolved so. (y)
 
It's a bit messy. But in the link above you can get it with Support of Digital Signatures and Attachment Annotations plus sample project and tests.
At first it didn't work for me.

I had to change:
C#:
private static X509Certificate2 GetCertificate()
{
    throw new NotImplementedException("Put your certificate path here");
    //return new X509Certificate2(....);
}

with this, in 'Program.cs' to make it work:
C#:
private static X509Certificate2 GetCertificate()
{
     return new X509Certificate2("D:\\mycert\\Imediata2021.pfx", "1234", X509KeyStorageFlags.Exportable);
}
 
Last edited by a moderator:
Back
Top Bottom