Multiple annotations inside one pdf is creating an incorrect xfdf object

PDF.js Express Version
8.1.0

Detailed description of issue
If I create multiple rectangle annotations over a single pdf then only the first annotation is getting communicated . This was working fine in the previous version(7.3) . Do you think this can be an xfdf issue on your end. Please let me know your feedback on it.

Expected behaviour
If I select more than one table and send xfdf info to server , all selected xfdf should have tag to it having the rect info.

Does your issue happen with every document, or just one?
All documents have this issue.

Link to document
sample_schedule-merged.pdf (797.7 KB)

Code snippet
annotManager.on(
“annotationChanged”,
(annotations, action, { imported }) => {
if (imported) return;
if (action === “add” || action === “modify”) {
this.annotationProcessing = true;
}
annotManager.exportAnnotCommand().then((xfdfString) => {
this.XFDFStr = xfdfString;
this.xmlArr.push(xfdfString);
this.newXfdf = this.xmlArr.join();
// newXfdf is the object we are sending to the backend

      });
    }
  );

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums:

Hey there,

You are using exportAnnotCommand which only exports new/changed annotations. We no not recommend using this function to export annotations, instead try exportAnnotations. We have a guide on this here

Let me know if switching to exportAnnotations works

Thanks!
Logan