Can you reproduce using one of our samples or online demos?
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?
Webviewer
Is your issue related to annotations?
Yes.
Please give a brief summary of your issue:
We are trying to add a check in place to confirm that all annotations have been loaded and also rendered on the doc reviwer object in the FE (visually). We are adding this check, as we want to ensure that when we run annotationManager.applyRedactions all annotations made are redacted and nothing is missed.
We are currently using “docViewer.getAnnotationsLoadedPromise” to let us know when all annotations are loaded. However, for very large files (EX. 40k annotations, 100 files, 8k pages) the promise resolves but in the FE docreviewer object there are still annotations being rendered to the object.
My question is → can i safely assume that if i ran applyRedactions all the annotations will be redacted even though they havent been rendered to the FE UI (but per the promise they have been loaded?). Also is there another Apryse API tool I can use to confirm that all annotations have been loaded and rendered to our Doc object? Is there a api function that also is faster (when using this promise to check it does take a very long time to resolve)
We are currently use
Webviewer 10.9.0
Please describe your issue and provide steps to reproduce it:
Upload 100 files that have 6k+ pages. Apply 40k annotations and load the document.
Please provide a link to a minimal sample where the issue is reproducible:
Cannot provide sample files
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.
You’re facing an issue with ensuring that all redaction annotations are both loaded and visually rendered before applying them using the applyRedactions method. The docViewer.getAnnotationsLoadedPromise does indicate when annotations are loaded, but rendering might still be in progress, especially for large documents.
Some things you can try:
Use the annotationManager.getAnnotationsList() method to verify that all expected annotations are present in the manager before applying redactions.
Consider using instance.Core.documentViewer.addEventListener('annotationsLoaded', callback) to be notified when annotations are loaded. However, this does not guarantee that all annotations are visually rendered.
To ensure rendering, use instance.UI.addEventListener('pageComplete', callback) for each page to confirm that rendering is complete.
To optimize performance, ensure that your environment is properly configured to handle large files and numerous annotations efficiently.
The getAnnotationsLoadedPromise should wait until all annotations are loaded in. You could wait for the annotationsLoaded event and then wait for the getAnnotationsLoadedPromise to trigger before applying the redaction.
Is your document linearized and being streamed to WebViewer? If so, you could try disabling the downloader to wait for all the document information to be loaded first:
I recommend updating your WebViewer to the latest version and wait for both the annotationsLoaded and the getAnnotationsLoadedPromise to see if your redaction annotations are loaded.
If it is not consistent, please share an input file (or open a support ticket if it’s a sensitive file) and we can investigate further.
Will look at those. But to confirm, once the promise for getAnnotationsLoadedPromise is resolved the FE should show all the annotations on the docreviewer? Or is there a difference between seeing the annotations on the FE document and having all annotations loaded to the annotation manager?
Yes, once the annotations are loaded into the document and is inside the annotation manager’s list:
Then it should be rendered on the viewer as well. If not, then there may be issues and the console may indicate if there was an issue in rendering the annotation.