Requiring Signature Text to be changed

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
We are trying to add a way to avoid having the user be able to enter the word Guest in the typed signature.

Expected behaviour
To be able to attach to the signature-create button so we can return true or false if we approve of the signature, which will allow us to compare the text entered with what we allow.

Code snippet
Currently I have tried to attach it to the save event but this event is fired after the signature is created. We are looking for an even that fires before its created to approve or disapprove of the text entered.

 const sigTool = docViewer.getTool('AnnotationCreateSignature');
                    sigTool.addEventListener("signatureSaved", (annotation) => {

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:


Hey Eric,

Thanks for your question about Signature Widget.

The word “Guest” in the typed signature is related to the current user name. We can make this value empty and the Create button will be disabled. Also, we can check if the user types “Guest” again and the button will be disabled as well.

Let me know if this approach works for you and if so, here is a guide code

const { annotationManager } = instance.Core;


  const iframeDoc = instance.UI.iframeWindow.document;
  const signatureInput = iframeDoc.querySelector('.text-signature-input');
  const signatureCreateButton = iframeDoc.querySelector('[data-element="textSignaturePanel"] .signature-create');

  signatureInput.addEventListener('input', (e) => {
    let inputValue =;
    if (inputValue === 'guest') {
        signatureCreateButton.disabled = true;
    } else {

Hope this helps,

Thank you,

1 Like