Free Support Forum -

Problems using the method ContainSignature (FACADES)


We are trying to know if one document is signed with a digitally sign but the method “ContainSignature” returns and error (See image and used code).
Can you help us?

This is the code that we are using

    'Step 1: Loading licenses
    Dim LicWord As New Aspose.Words.License()
    Dim LicPdf As New Aspose.Pdf.License()

    'Step 1: Loading Document
    Dim DOCDocument As New Aspose.Pdf.Document("C:\prueba.pdf")
    Dim DodAsked As New Aspose.Pdf.Facades.PdfFileSignature(DOCDocument)
    If DodAsked.ContainsSignature then
        Msgbox "Document signed"
        Msgbox "Document NOT signed"

End if

    MsgBox("Valor de Isencrypted: " & DOCDocument.IsEncrypted.ToString.Trim)
    Exit Sub
    ' Save the file 
    DOCDocument.Save("C:\1.- Temporal\Rellenables-aaaa.pdf", Aspose.Pdf.SaveFormat.Pdf)



Thank you for contacting support.

Would you please share a sample PDF document and mentioned image as we can not find any attachments. You may also share them via Google Drive, Dropbox etc if file size is huge.

Before sharing requested data, please ensure using Aspose.PDF for .NET 18.11 in your environment.