This link (Document) contains a digitally signed PDF that is correctly verified by IText (version 5.5.12) but not by Adobe Reader DC which issues the following message:
Error during signature verification.
Unexpected byte range values defining scope of signed data. Details: The signature byte range is invalid
Whos is correct? Adobe DC or IText? IText Bug?
Sample ITextSharp code used to PDF digital sign verification:
using System;
using System.Collections.Generic;
using iTextSharp.text.pdf;
using iTextSharp.text.pdf.security;
namespace ClassLibrary1
{
public class Class1
{
public Boolean PDFVerify(String file)
{
PdfReader pdfr = new PdfReader(file);
AcroFields af = pdfr.AcroFields;
List<String> names = af.GetSignatureNames();
foreach (String name in names)
{
PdfPKCS7 pk = af.VerifySignature(name);
if (!pk.Verify()) return false;
}
return true;
}
}
}