# How to merge signature annotation with PDF document

**URL:** <https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558>\
**Category:** Technical Support\
**Created:** [March 3, 2021, 3:39pm UTC](https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558 "2021-03-03T15:39:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefans](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@stefans](https://pdfjs.community/u/stefans)\
**Post date:** [March 3, 2021, 3:39pm UTC](https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558/1 "2021-03-03T15:39:49Z")

</div>

**PDF.js Express Version**

**Detailed description of issue**  
Hello,

I have a problem to merge any annotation with PDF document?  
I add the signature or any other annotation and then expect that document will have annotation attached to it after, but it doesn’t have.  
I am calling _annotManager.exportAnnotations()_ in order to then pass _xfdfString_ to _getFileData_  
function. Later, when I construct Blob and then download it, it doesn’t contain signature in it.

**Expected behaviour**  
I’m expecting to have annoation after I create and download Blob.

**Does your issue happen with every document, or just one?**  
That is happening with every document.

**Code snippet**

const myFN = async () =\> {  
const doc = docViewer.getDocument();  
const xfdfString = await annotManager.exportAnnotations( {links: false, widgets: false});

```
                      const data = await doc.getFileData({
                        xfdfString
                      });
                      
                      const arr = new Uint8Array(data);
                      const blob = new Blob([arr], { type: 'application/pdf' });
                      // const element = document.createElement("a");
                      const file2 = new File([blob], "updatedFile.pdf", {type: 'application/pdf'});
                  
                       }
```

---

<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:** [March 3, 2021, 6:27pm UTC](https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558/2 "2021-03-03T18:27:48Z")

</div>

Hey there!

PDF.js Express does not support merging annotations into the document on the client. If you want this functionality, pleas check out our sister product, [PDFTron WebViewer](https://www.pdftron.com/webviewer/) which has this functionality.

Or, you may use the PDF.js Express REST API which has an endpoint that merges annotations into the document. See the documentation [here](https://pdfjs.express/documentation/utils/merge).

Thank you!  
Logan

---

<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:** [March 3, 2021, 6:27pm UTC](https://pdfjs.community/t/how-to-merge-signature-annotation-with-pdf-document/558/3 "2021-03-03T18:27:52Z")

</div>


