Please give a brief summary of your issue:
(Think of this as an email subject)
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
rectAnnot.RefreshAppearance();
page..AnnotPushBack(Templine);
ViewCtrl.Update(Annot, pageNum);
ViewCtrl.Update(true);
We are calling this on all mouse down event. Hence this creating blinking in the ViewCtrl. Is there any better way to add the annot on every mouse click without blinking the whole display view?
Please provide a link to a minimal sample where the issue is reproducible:
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 a blinking issue when adding an annotation to a PDF document using Apryse’s Server SDK. This is likely caused by the frequent updates to the view control. Each time you update the control on a mouse event, it refreshes the entire view, leading to the blinking effect.
Some things you can try:
Instead of refreshing the entire view with ViewCtrl.Update(true), try to refresh only the specific area of the annotation to minimize the blinking.
Consider batching the updates and calling the refresh operation less frequently, if possible.
Ensure that the annotation’s appearance is being updated efficiently using rectAnnot.RefreshAppearance() before adding it to the page.
Try to debounce the mouse events to limit how often the update function is called.
Here are some resources that might help you:
Annotations Guide - Learn more about managing annotations in Apryse PDFs.
Viewer Control Documentation - Understand how to effectively control and update the viewer without causing flicker.
Some additional information on why this behavior happens can be referenced here:
Generally your usage of the Update overload Update(Annot, int) would redraw only the given area.
Depending on the annotation or load required PDFView may need to do a full update. This behavior can be seen if you draw multiple annotations in quick succession with our demo as well. A direct solution to what you’re seeing here would likely involve toggling SetProgressiveRendering as this would allow you to more control when the flickering needs to happen.