Please give a brief summary of your issue:
I’m encountering an issue where the text in a FreeTextAnnotation is disappearing after performing a search. I attached a video demonstrating the problem.
Some things I noticed:
The search highlights appear, then shortly after the labels disappear
The labels do not come back until page refresh
The opacity of some of the annotations changes when the labels disappear (see the green/red annotations at the bottom)
Zooming in/out results in a flicker where all disappear, fully reappear, then the labels disappear
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 experiencing an issue with FreeTextAnnotations disappearing after a search operation in the WebViewer. This could be due to how the rendering is handled during and after the search process, possibly involving the layers or visibility of annotations.
Some things you can try:
Ensure that your WebViewer is correctly handling Optional Content Groups (OCGs) or layers, as these might affect annotation visibility.
Check if there are any event listeners or custom scripts that modify annotation visibility during search operations.
Try adjusting the rendering settings or options related to annotations in your WebViewer configuration.
Look into the opacity and visibility properties of annotations, especially during zoom or search events.
I’ve been doing some debugging and it seems to be caused by the globalCompositeOperation of the canvas switching from source-over to destination-over. I overrode the canvas methods to always switch it back to source-over and it seems to resolve the problem. The search highlights are no longer see through after I do this, but I can fix that by adjusting the alpha channel on the colors passed into setSearchHighlightColors.
Hi Mickael, we’re storing the annotations separately and calling importAnnotations on them when we load the pdf viewer. Here’s are the xfdf for each of the annotations from my latest tests
I was able to reproduce your issue using your sample file and XFDF.
Thank you for providing them.
I have added this issue to the backlog for the product team to review. I included your research about the globalCompositeOperation and source-over versus destination-over as well.
We will let you know when we have additional updates.
I have added this issue to the backlog for the product team to review.
Hi Mickael, thank you so much for looking at this. This is a highly impactful bug for our users at AuditBoard. Could we escalate the priority on this bug fix?