Getting Unsigned signature in signature list

Product: Web viewer

Product Version: 11.4.0

Please give a brief summary of your issue: Getting Unsigned signature in signature list in digital Signature.

Please describe your issue and provide steps to reproduce it: I want to implement digital. I have add custom bottom to certified the pdf. In signature panel getting “Unsigned signature”.

Here is my code I’m using to achieve the same:

instance.UI.enableElements([
‘toolbarGroup-Forms’,
‘signatureToolButton1’,
‘signatureToolButton2’,
‘signatureToolButton3’,
‘signatureCreateToolButton’,
‘digitalSignatureButton’
]);
instance.UI.enableFeatures([Feature.Forms, Feature.InsertDigitalSignature]);

const certifyPdfButton = new instance.UI.Components.CustomButton({
dataElement: ‘custom-certify-pdf’,
title: ‘Certify PDF’,
img: ‘’,
onClick: async () => {
try {
await PDFNet.initialize();
const certUrl = ‘/GovBuilt.PlanReview/certs/apryse-test-cert.pfx’;
const certPassword = ‘YourPassword123’; // Replace with the correct password

        const response = await fetch(certUrl);
        console.log('Fetch response status:', response.status, response.statusText);
        if (!response.ok) throw new Error(`Failed to fetch certificate: ${response.statusText}`);
        const certBuffer = await response.arrayBuffer();
        console.log('Certificate buffer length:', certBuffer.byteLength);

        const doc = await instance.Core.documentViewer.getDocument().getPDFDoc();
        await doc.initSecurityHandler();

        console.log('Adding signature handler with URL:', certUrl);
        const sigHandlerId = await doc.addStdSignatureHandlerFromURL(certUrl, certPassword);
        console.log('Signature handler ID:', sigHandlerId);

        const certField = await doc.createDigitalSignatureField('CertificationSigField');
     
        const page1 = await doc.getPage(1);
        const widgetAnnot = await PDFNet.SignatureWidget.createWithDigitalSignatureField(
            doc,
            new PDFNet.Rect(100, 100, 300, 150),
            certField
        );
        await page1.annotPushBack(widgetAnnot);

        certField.setDocumentPermissions(PDFNet.DigitalSignatureField.DocumentPermissions.e_no_changes_allowed);
        await certField.certifyOnNextSaveWithCustomHandler(sigHandlerId);

        const buf = await doc.saveMemoryBuffer(PDFNet.SDFDoc.SaveOptions.e_incremental);
        const blob = new Blob([buf], { type: 'application/pdf' });
        const fileName = 'CertifiedDocument.pdf';
        saveAs(blob, fileName);

        alert('PDF Certified and downloaded!');
    } catch (error) {
        console.error('Certification failed:', error);
        alert('Certification failed. See console for details.');
    }
}

});

Additionally getting error while try to save at this " const buf = await doc.saveMemoryBuffer(PDFNet.SDFDoc.SaveOptions.e_incremental);"

1 Like

Hello, I’m AiRon, an automated tech support bot :robot:
While you wait for one of our customer support representatives, I can help you with your question.


It seems like you are encountering an issue where the signature is showing as “Unsigned” in the signature panel. This could be due to several reasons related to the implementation of the digital signature feature in your WebViewer setup.

Some things you can try:

  • Ensure that the certificate and password are correctly specified and accessible from the server.

  • Verify that the digital signature field is correctly created and placed on the document.

  • Check that the signature handler is properly initialized and added to the document.

  • Make sure that the document permissions are set correctly to restrict changes after certification.

  • Confirm that the document is being saved correctly and that any changes are committed.



Here are some resources that might help you:


Hopefully, this helps you solve your problem while you wait for a human to get back to you.

1 Like

Hi Rishu,

To implement a Digital Signature in Webviewer, you can follow this guide, which will explain what it is and provide more guides on how to implement specific features:

For instance, certification:

Here is a code sample showing the steps to do:

Let us know if you have any questions.

Best Regards,
Mickaël.