Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re trying to set your PDF document to read-only mode in WebViewer but encountering issues. When setting annotations to read-only, it’s essential to ensure that all annotations are correctly marked and the document is properly saved with these changes.
Some things you can try:
Ensure that you are correctly iterating over all annotations and setting each to read-only.
Use annot.setReadOnly(true) instead of annot.ReadOnly = true; to ensure the property is set correctly.
After modifying annotations, make sure to save the changes back to the document using annotationManager.exportAnnotations() and then re-import if necessary.
Ensure that enableReadOnlyMode() is called after the document is fully loaded and the annotations are set.
Check if any other parts of your code might be overriding these settings.