# Add Annotation from top bar

**URL:** <https://pdfjs.community/t/add-annotation-from-top-bar/541>\
**Category:** Technical Support\
**Created:** [February 25, 2021, 2:43pm UTC](https://pdfjs.community/t/add-annotation-from-top-bar/541 "2021-02-25T14:43:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lganswindt](https://avatars.discourse-cdn.com/v4/letter/l/7c8e57/32.png) [@lganswindt](https://pdfjs.community/u/lganswindt)\
**Post date:** [February 25, 2021, 2:43pm UTC](https://pdfjs.community/t/add-annotation-from-top-bar/541/1 "2021-02-25T14:43:18Z")

</div>

**PDF.js Express Version**  
6.14.9

**Detailed description of issue**  
We are trying to add text annotations with the default tool annotations header. When I added the text per click, this xml is created:

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

In the content section to may “&quot” are printed.

If we move the text or change the content of the annotation, the XML is changed and printed the correct way.

**Expected behaviour**  
We would expect the webviewer to export the annotation the right way right at the beginning and not only, when it got changed.

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

**Code snippet**

```javascript
    annotManager.exportAnnotations({ links: false, widgets: false, annotList: annotList }).then( xfdfString => {
                  console.log(xfdfString)

                  instance.docViewer.getDocument().getFileData({xfdfString}).then(function (data) {
                    const arr = new Uint8Array(data);
                    var blob = new Blob([arr], {type: 'application/pdf'});
                    var reader = new FileReader();
                    reader.readAsDataURL(blob);
                    reader.onloadend = function () {
                      app.file.base64 = reader.result;
                      app.file.base_64_string = app.file.base64.split(',')[1];
                      app.file.atob = atob(reader.result.replace('data:application/pdf;base64,', ''));
                      app.file.file_name = app.file_name;
                      app.file.xfdf = xfdfString;
                    }
                  })
                });

```

---

<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 1, 2021, 5:36pm UTC](https://pdfjs.community/t/add-annotation-from-top-bar/541/2 "2021-03-01T17:36:14Z")

</div>

Hey there!

Thank you for catching this. We can reproduce the issue and will investigate.

I’ll keep you updated on a fix.

Thanks!  
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 2, 2021, 7:34pm UTC](https://pdfjs.community/t/add-annotation-from-top-bar/541/3 "2021-03-02T19:34:47Z")

</div>

Hey! We found a fix and it will be fixed in the next patch. Keep an eye on #announcements.

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:20pm UTC](https://pdfjs.community/t/add-annotation-from-top-bar/541/4 "2021-03-03T18:20:07Z")

</div>

Hey!

This is fixed in 7.3.1

> [@Patch 7.3.1 - Regression Fixes](https://pdfjs.community/t/patch-7-3-1-regression-fixes/559):
>
> Hey guys! As promised, 7.3.1 has been released that fixes a couple issues with the 7.3 release. View the changelog [here](https://pdfjs.express/documentation/changelog/). Thanks! Loga
