Getting an unhandled exception calling verifySignedDigitalSignatures()

WebViewer Version: 10.10.1

Do you have an issue with a specific file(s)? Yes
Can you reproduce using one of our samples or online demos? Yes
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? No
Is your issue related to annotations? No

Please give a brief summary of your issue:
Getting an unhandled exception calling verifySignedDigitalSignatures() when loading a given pdf

Please describe your issue and provide steps to reproduce it:
Validating the signatures on the attached PDF via Apryse Webviewer I get a generic error when verifySignedDigitalSignatures() is called.
The error can also be replicated on your demo site with the attached PDF

https://sdk.apryse.com/samples/web/samples/full-apis/ViewerDigitalSignatureValidationTest/

My code in angular is the following:

async checkDocumentPermissions1(instance: any): Promise<Boolean> {
        try {
            if (!instance) {
                return false;
            }

            const doc = await instance.Core.documentViewer.getDocument().getPDFDoc();
            if (!doc) {
                console.log('Document is empty or invalid.');
                return false;
            }

            const opts = await instance.Core.PDFNet.VerificationOptions.create(instance.Core.PDFNet.VerificationOptions.SecurityLevel.e_compatibility_and_archiving);
            if (!opts) {
                console.log('Failed to create verification options.');
                return false;
            }

            const result = await doc.verifySignedDigitalSignatures(opts);
            return true;
        } catch (error: any) {
            console.log('Catch err', error);
            return false;
        }
    }

259d15f1-feb1-462e-ba2a-a466d5a81070-1.pdf (95.6 KB)

Best regards,
William

1 Like

Hello @w.bonazzoli,

Thank you for posting on our forum,

I was able to reproduce that error by loading the file into the sample with the signature panel open.

The file may be malformed or corrupted in some way. How was this file created it as well as the fields/signatures? Do you have any other files which can reproduce this issue?

Best Regards,
Jacob Romano Carlsen
Web Development Support Engineer
Apryse Software Inc.

1 Like

I don’t think the pdf is corrupted, Adobe gives me back the information of the signatures attached to the document.
I have another similar file if it can help you

68195dc3-bae1-4062-b6dc-69454aaf1461.pdf (143.7 KB)

1 Like

Thanks for sharing the additional file. We have been able to reproduce this Bad obj stream error and are investigating it further. Once we have more information for our investigation we will update you with our findings.

Thanks for your patience while we look into this.

1 Like