Getting error "b.map is not a function" in console window

Hi Team,

While previewing the document, I am getting the error as attached in this post. Please help me to resolve this issue.

Note: This error is thrown after calling the below function “drawAnnotationFromList()”.

annotManager.drawAnnotationsFromList( annotManager.importAnnotations( data ).then( function () {
// Our code
}) );

Regards,
Gowtham C

Capture.PNG

Hi Gowtham,

Thanks for reaching out. If I understand correctly, you are trying to import annotations from an XFDF string into the document? If so you only need the call to annotManager.importAnnotations. As stated in the documentation this call:

Returns a promise that resolves with the annotations have been imported

Therefore, your call to drawAnnotations from list is not needed as the annotations would already be imported and drawn. Please also make sure you are calling this after the document has been loaded, by adding a listener on the documentLoaded event.

Let me know if I can provide further assistance.

Best Regards,
Armando Bollain
Software Developer
PDFTron Systems, Inc.
www.pdftron.com

CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original.