Importing annotation issue

Hi nikhilhill19,

Theres a few things I can point out in the code that could cause some issues:

  1. The XFDF with the trn-custom-data has incorrect JSON, this is typically from copying XFDF straight from the browser console (which is a Chrome issue, for some reason it adds " before every quotation), we generally do not recommend copying XFDF manually, instead saving it with calling:
    copy(await instance.Core.annotationManager.exportAnnotations())
    to get around the text copying issue.
  2. Youre calling importAnnotations on an empty string:
    const data2 = ``;
    ...
    inst.Core.annotationManager.importAnnotations(data2);

Unfortunately, I cant reproduce this issue without a runnable sample project, since your code requires specific files.

Best regards,
Tyler