Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
PDFDocument doc = new PDFDocument("your-license-key");
            frmDigital f = new frmDigital();

           f.txtPDFLoad.Text = theDialog.FileName;
           string path = theDialog.FileName.ToString();
           f.txtPDFLoad.Text = path;
            // Load an existing PDF
            doc.Load(theDialog.FileName);

             
            doc.AddSignature(
                  @"C:\Users\nikola.nedelkovski\Downloads\VodovodTestSertifikat\VodovodTestSertifikat.pfx",       // signature file
                  "",                           // signature password
                  "Approved",                           // reason
                  "Duna",                        // location
                  "Signed",                   // contact info
                  1,                                    // page number
                  "fldSign",                            // signature field name
                  new RectangleF(4f, 4.8f, 2f, 0.4f));  // location

            // Write signed document to file
            doc.Save("signed_doc.pdf");

           
            doc.Close();

Here is code how i add digital signature but code fail on password file. I have not stetted password on my pfx file and when i try to add signature it fails. Any idea how to make method without password comparation?
Posted
Updated 24-Jul-15 2:23am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900