WebViewer Version:
10.1.0
Do you have an issue with a specific file(s)?
No.
Can you reproduce using one of our samples or online demos?
No.
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?
No.
Is your issue related to annotations?
Yes. Redact Annotation.
Please give a brief summary of your issue:
(Think of this as an email subject)
applyRedactions API does not return.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Hello.
I am developing Redact.
Read RedactAnnotation(xfdf) from DB and display it on the screen.
ApplyRedactions immediately after that.
Processing is not returned.
sample code.
protected viewerInstance: WebViewerInstance;
protected Initialize(): void {
webviewer({fullAPI: true, enableRedaction: true, ...})
.then((instance: WebViewerInstance) => {
this.viewerInstance = instance;
documentViewer.addEventListener('documentLoaded', () => {
this.onDocumentLoaded();
});
}
}
protected onDocumentLoaded(): void {
const xfdfs = DB.getAnnotationXfdfs();
await Promise.all(
xfdfs.map(xfdf ........
const annot = await this.viewerInstance.Core.annotationManager.importAnnotations(xfdf);
await this.viewerInstance.Core.annotationManager.redrawAnnotation(annot[0]);
);
const redactionList = this.viewerInstance.Core.annotationManager
.getAnnotationsList()
.filter(
(annot) =>
annot instanceof
this.viewerInstance.Core.Annotations.RedactionAnnotation
);
console.log('redactionList.length = ' + redactionList.length);
try {
console.log('11111111111111111');
const aaa =
this.viewerInstance.Core.annotationManager.isApplyRedactionEnabled();
console.log('aaa = ' + aaa);
const bbb =
this.viewerInstance.Core.annotationManager.isAnnotationRedactable(
redactionList[0]
);
console.log('bbb = ' + bbb);
const rtn =
await this.viewerInstance.Core.annotationManager.applyRedactions();
console.log('22222222222222222');
console.log(rtn);
} catch (error) {
console.log(error);
}
}
Console.log
(ApplyRedactions() may return very occasionally.)
Am I using applyRedactions() incorrectly?
Best Regards.
Please provide a link to a minimal sample where the issue is reproducible: