Remove active border from custom stamp annotation

WebViewer Version: 8.7.0

“No” to all of these questions:

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

Is your issue related to annotations? Yes

We are creating a custom stamp annotation with the Node.js SDK via a PDF page, as illustrated in this guide.

When selecting such annotation in WebViewer client, there is a red border, presumably denoting its active / selected state:

Screenshot 2023-01-09 at 2.24.45 PM

Do we have the ability to customize and/or remove this red border?

This mightly be related to annotation user permissions and your user role. Red border may appear if the annotation is read-only or locked, you can check this guide here JavaScript PDF Viewer User Permission Demo
You will need to set your user role to admin probably.

Source code here for the same demo PDFTron Systems Inc. | Documentation

Red border may appear if the annotation is read-only or locked

Thanks, that makes sense.

In our case, these custom annotations are intentionally locked. Is there a way for us to customize and/or remove the red border in this locked state?

Currently, it is not possible as an out-of-the-box feature, unfortunately.

We had reached out via a private support ticket and parallel and were provided a solution that will seemingly work. Posting here for visibility / posterity:

You should be able to change the color with the following static property:


It should take an annotation color. You can also try setting the alpha level to 0 to hide it.