Do you have an issue with a specific file(s)? No
Can you reproduce using one of our samples or online demos? Yes
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? React
Is your issue related to annotations? Yes
Please give a brief summary of your issue:
Loading annotations from PDF progress
Please describe your issue and provide steps to reproduce it:
Is there a progress callback for loading annotations embedded in a PDF (like for loadDocument onLoadingProgress)? We have a PDF document with more than 10k annotations and loading takes a lot of time until the annotations loaded event is fired. Our users need to know when all annotations are loaded and in case of many annotation would like to see the progress.
Please provide a link to a minimal sample where the issue is reproducible:
You could potentially do some kind of progress modal for when annotations are imported using the imported flag
However there is currently no way to know how many total annotations could be loaded from a document until the viewer has access to all the annotations, or if you know before hand if importing via XFDF
annotationManager.addEventListener('annotationChanged', (annotations, action, { imported }) => {
// imported indicates if the annotations were imported via a process, mainly XFDF
if (imported) {
// setup progress here
console.log(annotations)
}
});
Thanks for your reply. But how do I know how many annotations there will be? It would like to have some kind of percent loaded display for annotations.
We currently do not have a way to know how many total annotations are in the document right after it is loaded.
We don’t currently have this on our roadmap but, we will add it to the backlog for our product team to review for feasibility and viability.
Please keep an eye out for the change-logs section as new features get included.