WebViewer Version: 11.12
Do you have an issue with a specific file(s)? yes
Can you reproduce using one of our samples or online demos? no
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? yes
Is your issue related to annotations? yes
Please give a brief summary of your issue:
When loadAnnotations: false is passed to instance.UI.loadDocument, stamp annotations imported via annotationManager.importAnnotations(xfdfString) are not rendered on the PDF canvas. They appear in the comments panel but are invisible on the page.
Steps to reproduce:
-
Configure WebViewer with
webviewerServerURL
Configuration:fullAPI: true,forceClientSideInit: true,webviewerServerURLconfigured -
Load a document with
loadAnnotations: false:instance.UI.loadDocument(fileUrl, { filename: fileName, loadAnnotations: false, customHeaders: { Authorization: `Bearer ${token}` }, }); -
On
documentLoaded, import XFDF containing a stamp annotation:documentViewer.addEventListener("documentLoaded", async () => { const xfdfString = await fetchXfdf(); await annotationManager.importAnnotations(xfdfString); }); -
Stamp annotation appears in comments panel but is invisible on the canvas
NOTE: The stamp is visible when loadannotations is set to true. And then I do the following
-
Delete all annotations
const existingAnnotations = annotationManager.getAnnotationsList(); if (existingAnnotations.length > 0) { annotationManager.deleteAnnotations(existingAnnotations, { imported: true, force: true, }); } -
Import annotations
await annotationManager.importAnnotations(xfdfString, {imported: true})I would like to know what the issue could be when I enable or disable
loadannotations