Annotation.ReadOnly not working

WebViewer Version: 8.2.0

Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes
Are you using the WebViewer server? No
Does the issue only happen on certain browsers? No
Is your issue related to annotations? Yes

Please give a brief summary of your issue:
Annotation.ReadOnly not working properly.

Please describe your issue and provide steps to reproduce it:
I try to set every annotation on a PDF ReadOnly. I’m doing it with this code in the Angular WebViewer Example (GitHub - PDFTron/webviewer-angular-sample: Sample to demonstrate integrating WebViewer into Angular)

      documentViewer.addEventListener('annotationsLoaded', () => {
        annotationManager.getAnnotationsList().forEach(annot => {
          annot.ReadOnly = true;
        });
      });

In the WebViewer all annotations are locked as expected. But when i download the PDF only the first annotation is locked:

But when i also change the Author-Name, all Annotations get locked, as expected:

      documentViewer.addEventListener('annotationsLoaded', () => {
        annotationManager.getAnnotationsList().forEach(annot => {
          annot.Author = 'Guest';
          annot.ReadOnly = true;
        });
      });

The downloaded PDF looks as followed:

How can i achieve, that ReadOnly is working also when not touching the author?

Thanks,
Chris

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hello Chris,

Thank you for reporting this bug, and we are taking a look into fixing it. For now, a work around would be using annotation.setModified instead of setting the author.

Best Regards,
Tyler Gordon
Web Development Support Engineer
PDFTron Systems, Inc.
www.pdftron.com

1 Like

Hello Tylor,

all right, thank you for the workaround.