# Replace the comments pane

**URL:** <https://pdfjs.community/t/replace-the-comments-pane/852>\
**Category:** Technical Support\
**Created:** [June 27, 2021, 8:01am UTC](https://pdfjs.community/t/replace-the-comments-pane/852 "2021-06-27T08:01:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alon.avgil](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@alon.avgil](https://pdfjs.community/u/alon.avgil)\
**Post date:** [June 27, 2021, 8:01am UTC](https://pdfjs.community/t/replace-the-comments-pane/852/1 "2021-06-27T08:01:53Z")

</div>

Hi all,  
When using the addAnnotation, it requires a specific object withthese properties:Author   
CustomData   
DateModified   
elementName   
selectionModel   
Height   
Hidden   
Invisible   
Printable   
ReadOnly   
Locked   
LockedContents   
Id   
IsAdded   
IsDeleted   
IsModified   
Listable   
NoMove   
NoResize   
NoRotate   
NoDelete   
NoZoom   
NoView   
ToggleNoView   
PageNumber   
Subject   
Width   
X   
Y   
Rotation   
RotationControlEnabled   
MaintainAspectRatio   
isClickableOutsideRect   
ToolName

But when getting the annotation info in annotationChanged event, i get a whole different object with different properties:

{ Subject: ‘Highlight’, aC:1, ww:173.31823999999995, yw:122.396, es:53.55503999999999, ds:12.143999999999991, gp:0, hp:null, zJ:0, FJ:true, Wf:{}, YB:true, eW:false, yJ:true, ZB:false, fW:false, xJ:false, NoZoom:false, NoRotate:false, CJ:true, bl:{ R:255, G:205, B:69, A:1 }, PJ:‘Guest’, nC:‘2021-06-27T12:10:06.511Z’, Uw:‘182fd51a-0b1e-bfe5-aebf-22d5241f99fa’, AC:true, an:false, BK:false, cL:{}, Fj:[], ti:null, vg:null, le:null, HA:null, xG:null, yj:null, zj:null, UK:1, aK:‘2021-06-27T12:10:06.511Z’, nx:null, BJ:null, DJ:null, Ob:[{ x1:173.31823999999995, y1:134.54, x2:226.87327999999994, y2:134.54, x3:226.87327999999994, y3:122.396, x4:173.31823999999995, y4:122.396 }], ih:false, vx:null, TextIndices:null, SurroundingTexts:null, ‘\_xsi:type’: ‘Highlight’, Mb:null, BlendMode: ‘multiply’, x7: ‘מספקות הוא’, ToolName: ‘AnnotationCreateTextHighlight’ }

How can i save an annotation to my db and then add it to the 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:** [June 27, 2021, 8:01am UTC](https://pdfjs.community/t/replace-the-comments-pane/852/2 "2021-06-27T08:01:58Z")

</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:
- [Real-time collaboration client](https://pdfjs.express/documentation/collaboration/realtime-collaboration-client)
- [Remove annotations in viewer - Programmatically](https://pdfjs.express/documentation/annotation/remove-annotations#programmatically)
- [Best practices for PDF.js Express - Store annotations](https://pdfjs.express/documentation/learn-more/best-practices#store-annotations)

APIs:
- [Annotations.RedactionAnnotation - addCustomAppearance(doc [, options])](https://pdfjs.express/api/Annotations.RedactionAnnotation.html#addCustomAppearance__anchor)
- [CoreControls.DocumentViewer - setPagesUpdatedInternalAnnotationsTransform(handler)](https://pdfjs.express/api/CoreControls.DocumentViewer.html#setPagesUpdatedInternalAnnotationsTransform__anchor)
- [PDF.js Express Utilities](https://pdfjs.express/api/utils/index.html#__anchor)

Forums:
- [Custom Rubber Stamp](https://pdfjs.community/t/custom-rubber-stamp/110/3)
- [Integrate PDF.JS Express in Salesforce Lightning Component](https://pdfjs.community/t/integrate-pdf-js-express-in-salesforce-lightning-component/442/1)
- [Why it takes 2-3 minutes to save annotations to a PDF file?](https://pdfjs.community/t/why-it-takes-2-3-minutes-to-save-annotations-to-a-pdf-file/563/1)

---

<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:** [June 29, 2021, 2:27pm UTC](https://pdfjs.community/t/replace-the-comments-pane/852/3 "2021-06-29T14:27:24Z")

</div>

Hi there,

Instead of storing an object, we recommend storing an XFDF string and importing that into the document.

We have a guide on this process [here](https://pdfjs.express/documentation/annotation/import-export/overview).

Thanks!  
Logan

---

<div class="post-metadata">

**Author:** ![alon.avgil](https://avatars.discourse-cdn.com/v4/letter/a/4bbf92/32.png) [@alon.avgil](https://pdfjs.community/u/alon.avgil)\
**Post date:** [June 29, 2021, 2:51pm UTC](https://pdfjs.community/t/replace-the-comments-pane/852/4 "2021-06-29T14:51:39Z")

</div>

Thank you. I saw that.  
We are considering another solution which works with json objects
