# How to use enable/diable readOnly from AnnotationManager is there is no instances of this method?

**URL:** <https://pdfjs.community/t/how-to-use-enable-diable-readonly-from-annotationmanager-is-there-is-no-instances-of-this-method/3095>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [January 20, 2024, 6:27pm UTC](https://pdfjs.community/t/how-to-use-enable-diable-readonly-from-annotationmanager-is-there-is-no-instances-of-this-method/3095 "2024-01-20T18:27:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vlasov](https://avatars.discourse-cdn.com/v4/letter/v/e68b1a/32.png) [@vlasov](https://pdfjs.community/u/vlasov)\
**Post date:** [January 20, 2024, 6:27pm UTC](https://pdfjs.community/t/how-to-use-enable-diable-readonly-from-annotationmanager-is-there-is-no-instances-of-this-method/3095/1 "2024-01-20T18:27:09Z")

</div>

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

**PDF.js Express Version**  
8.7.4

**Detailed description of issue**  
I’m trying to setup latest version of the PDF Viewer, but facing a ton of issues.  
One of them is that I can’t find a way to toggle readOnly mode.  
The API docs said that in the class instance.Core.AnnotationManager, there is a method enableReadOnly/disableReadOnly. But I can’t find or use it. partially beacause there is no type definitions and I need to blindly pick and test each method.  
The question under this topic is how to toggle readOnly mode?

**Expected behaviour**  
{Provide a screenshot or description of the expected behaviour}

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

**Code snippet**  
does not required

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [January 22, 2024, 7:12pm UTC](https://pdfjs.community/t/how-to-use-enable-diable-readonly-from-annotationmanager-is-there-is-no-instances-of-this-method/3095/2 "2024-01-22T19:12:10Z")

</div>

Hi there,

Thank you for contacting pdf.js express forums,

You can enable read only mode via the WebViewer constructor or toggle them off and on using enableReadOnlyMode and disableReadOnlyMode

```javascript
instance.Core.annotationManager.enableReadOnlyMode()

```

> **[Set Annotation Permissions with PDF.js Express | Documentation](https://pdfjs.express/documentation/annotation/annotation-permissions#readonly-mode)**

Best regards,  
Kevin Kim
