Error while importing Annotations: Uncaught (in promise) TypeError: ba.getElementsByTagName is not a function

WebViewer Version: 10.4.0

Error while importing annotations:

annotationManager.importAnnotations(xfdfString);

The exception:
Uncaught (in promise) TypeError: ba.getElementsByTagName is not a function
at w.yfa (webviewer-core.min.js:3078:208)
at w.X$ (webviewer-core.min.js:3081:115)
at webviewer-core.min.js:506:172
at new Promise ()
at pa.BP (webviewer-core.min.js:506:122)
at eval (eval at (pdftronviewer.js:1:1), :1:19)
at pdftronviewer.js:119:19

the line that causes the error (webviewer-core.min.js:3078:208):

return ba && 0 < ba.getElementsByTagName(“annots”).length ? (a.a.qs(ba, “link”),

Hello Muhammed,

Could you please provide the XFDF string you are trying to import? How did you create the XFDF string and annotation? Did you use WebViewer and exportAnnotations()? Please also provide the PDF document with the annotations.

Thank you.

Best Regards,
Darian

Thanks for replying. It was XFDF malformation. It works now.