Getting fillColor black after expanding/shrinking a freeText annotation

WebViewer Version:

Do you have an issue with a specific file(s)?
Yes
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 a front-end framework?
Yes
Is your issue related to annotations?
Yes

Please give a brief summary of your issue:
FreeText annotations get fillColor rgba(0,0,0,1) automatically when expanded/shrunk.

Please describe your issue and provide steps to reproduce it:

Hi,

When I try to expand or shrink a freeText annotation, it automatically gets fillColor: rgba(0,0,0,1), resulting in a black bar of the annotation’s size. This happened with only one PDF file.

I have tried reproducing it at https://showcase.apryse.com/. I am attaching a link to both the PDF and the recorded video. Please help!

Please provide a link to a minimal sample where the issue is reproducible:
PDF
Video

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

Hi srijeetpatil7

Based on the information you provided, we were able to reproduce the issue. However, the selected field has already pre-set fillColor:rgba(0,0,0,1). You can easily check that by selecting the annotation and clicking on Style, then Fill. Can you please provide us with the steps you have used to create this annotation?

This was uploaded by one of the users on our platform, so I am unaware of how the annotation was created. Also, I tried opening the same document in Adobe Reader and the default PDF viewer on Mac, but the issue didn’t occur there.

Hello srijeetpatil7,

We were able to produce the issue in Adobe Reader as well, without any problems, check the attached video please. It looks like its a problem with the document and the way the annotations are created. If you manage to find out more, please let us know.

Hi,

I had tried it in the mobile version of Adobe Reader (where it seemed to work fine), and it even works fine in the default PDF viewer on Mac. I have attached a video. Thanks.

Hi srijeetpatil7,
What we can suggest is using annotationManager to change fillColor of selected (or all) annotations programatically. Since we can see in WV they have already pre set fillColor. You can use the following code snippet:

const { Annotations } = instance.Core
const annot = instance.Core.annotationManager.getSelectedAnnotations()[0]
instance.Core.annotationManager.setAnnotationStyles(annot, {
    FillColor: new Annotations.Color(255, 255, 255, 0)
})

You could also use getAnnotationsList API to target different annotations without selecting them. For this particular document you might need to set user as admin:

instance.Core.annotationManager.promoteUserToAdmin()

Also, you should check the following guides: Apryse Documentation | Documentation
and
Apryse WebViewer Class: AnnotationManager