# Unable to save signatures

**URL:** <https://pdfjs.community/t/unable-to-save-signatures/1622>\
**Category:** Technical Support\
**Created:** [April 23, 2022, 2:19am UTC](https://pdfjs.community/t/unable-to-save-signatures/1622 "2022-04-23T02:19:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![allenwipf](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@allenwipf](https://pdfjs.community/u/allenwipf)\
**Post date:** [April 23, 2022, 2:19am UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/1 "2022-04-23T02:19:24Z")

</div>

**Which product are you using?**  
PDF.js Express Plus

**PDF.js Express Version**  
8.4.0

**Detailed description of issue**  
When i click on signatures, i’d expect a checkbox to give the ability to save a signature but there is not.

**Expected behaviour**  
A checkbox to check that would fire an event

**Does your issue happen with every document, or just one?**  
every document

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/ffbcd25c7d423db8d5acd5db201c272f4db306dd.png) [@system](https://pdfjs.community/u/system)\
**Post date:** [April 23, 2022, 2:19am UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/3 "2022-04-23T02:19:29Z")

</div>

**Hello, I’m Ron, an automated tech support bot 🤖**

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

Guides:
- [Add signature fields to PDFs](https://pdfjs.express/documentation/signature/signature-field.8)
- [Add signatures to PDFs](https://pdfjs.express/documentation/signature/signature-tool)
- [Signatures with PDF.js Express](https://pdfjs.express/documentation/signature/overview)

APIs:
- [Core.Tools.SignatureCreateTool - signatureSaved](https://pdfjs.express/api/Core.Tools.SignatureCreateTool.html#event:signatureSaved__anchor)
- [WebViewerInstance - setDisplayedSignaturesFilter(filterFunction)](https://pdfjs.express/api/7.0/WebViewerInstance.html#setDisplayedSignaturesFilter__anchor)
- [UI.Fonts - getSignatureFonts()](https://pdfjs.express/api/UI.html#.Fonts#getSignatureFonts__anchor)

Forums:
- [Can’t import saved signatures in version 7](https://pdfjs.community/t/cant-import-saved-signatures-in-version-7/371/1)
- [Requiring Signature Text to be changed](https://pdfjs.community/t/requiring-signature-text-to-be-changed/1431/1)
- [Retrieve signature image that the user has drawn, typed or uploaded](https://pdfjs.community/t/retrieve-signature-image-that-the-user-has-drawn-typed-or-uploaded/1248/4)

---

<div class="post-metadata">

**Author:** ![dnavarro](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/dnavarro/32/707_2.png) [@dnavarro](https://pdfjs.community/u/dnavarro)\
**Post date:** [April 27, 2022, 3:52am UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/4 "2022-04-27T03:52:45Z")

</div>

Hi There,

Thanks for your question and sorry about the delay. Could you please explain to me better the use case?

When you say “When I click on signatures” do you mean this list in the green square below? Or the **Add new signature**?

 ![Screen Shot 2022-04-26 at 8.48.31 PM](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/79c77da2129e4d04160023c5c729381b23f6fae9.png)

Please provide more details about your goal and I’ll be happy to help you.

Thank you,

Dandara

---

<div class="post-metadata">

**Author:** ![allenwipf](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@allenwipf](https://pdfjs.community/u/allenwipf)\
**Post date:** [April 27, 2022, 2:02pm UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/5 "2022-04-27T14:02:16Z")

</div>

No worries Dandara. Thanks for getting back. I guess what i’d like is to give user the option to save or not save signatures.

![image](https://canada1.discourse-cdn.com/flex031/uploads/pdfjscommunity/original/1X/c7713a64fe1de338b090b1010e5fa56ab913330e.png)

As you can see, the checkbox doesn’t show on that form like in some of the demos.

---

<div class="post-metadata">

**Author:** ![allenwipf](https://avatars.discourse-cdn.com/v4/letter/a/b2d939/32.png) [@allenwipf](https://pdfjs.community/u/allenwipf)\
**Post date:** [April 27, 2022, 2:06pm UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/6 "2022-04-27T14:06:25Z")

</div>

if it helps anyone, it’s pretty straight forward to save the signature using events. The below is using LocalStorage which i plan to switch to IndexedDB. No big deal but it would be nice to have checkbox on the signature modal to uncheck in case they don’t want to save the sig.

```javascript
  addSignatureEventListeners(docViewer){

    const signatureTool = docViewer.getTool('AnnotationCreateSignature');

    docViewer.addEventListener('documentLoaded', () => {
      const sigs = JSON.parse(localStorage.getItem(SIGNATURE_KEY))
      signatureTool.importSignatures(sigs);
    });

    signatureTool.addEventListener('signatureSaved', async () => {
      signatureTool.exportSignatures().then(sigs => {
        let filtered = sigs.filter(s => s != null)
        localStorage.setItem(SIGNATURE_KEY, JSON.stringify(filtered))
      })
    });

    signatureTool.addEventListener('signatureDeleted', async () => {
      signatureTool.exportSignatures().then(sigs => {
        const filtered = sigs.filter(s => s != null)
        localStorage.setItem(SIGNATURE_KEY, JSON.stringify(filtered))
      })
    });
  }

```

---

<div class="post-metadata">

**Author:** ![Logan](https://yyz1.discourse-cdn.com/flex031/user_avatar/pdfjs.community/logan/32/13_2.png) [@Logan](https://pdfjs.community/u/Logan)\
**Post date:** [May 3, 2022, 2:24pm UTC](https://pdfjs.community/t/unable-to-save-signatures/1622/7 "2022-05-03T14:24:36Z")

</div>

Hey there,

Thank you for your feedback - I will forward this to our UI/UX team!

Logan
