Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed Sep 19, 2018 3:31 pm

Hi,
I have a problem. In the package PDF Spire, the method verify signature return false in valid signature.
I’m using the comercial version 4.6.8.2035.

This is the code i used:
(I have at least six signatures per document)

Code: Select all
public bool documentoValidoPath(string ruta)
{
   bool valid = true;
   List<PdfSignature> signatures = new List<PdfSignature>();
   using (Spire.Pdf.PdfDocument doc = new Spire.Pdf.PdfDocument(ruta))
   {
       PdfFormWidget form = (PdfFormWidget)doc.Form;
       for (int i = 0; i < form.FieldsWidget.Count; ++i)
       {
         PdfSignatureFieldWidget field = form.FieldsWidget[i] as PdfSignatureFieldWidget;
         if (field != null && field.Signature != null)
         {
            PdfSignature signature = field.Signature;
            signatures.Add(signature);

            PdfSignature signatureOne = signatures[i];
            try
            {
                   valid = signatureOne.VerifySignature();
                   if (!valid)
{
return valid;
}
            }
            catch (Exception ex)
            {
                    Console.WriteLine(ex.Message);
                    Console.ReadLine();
            }
       }
}
}
 return valid;
}

Rclemotte
 
Posts: 1
Joined: Wed Aug 29, 2018 5:54 pm

Thu Sep 20, 2018 7:46 am

Hello,

Thanks for your inquiry.
To help us locate your issue quickly, please provide your original Pdf file. Thanks in advance. You could send it to us via email( [email protected]).

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Wed Sep 26, 2018 10:00 am

Hello,

Greetings from E-iceblue.
Could you let us know how is the issue going? Thanks in advance for your valuable feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1536
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.PDF