Failed xfdf downloading

PDF.js Express Plus 8.x.x.

Detailed description of issue
Tried to download pdf with annotations, xfdfs. It happens every document.

Link to document

Code snippet
WebViewer(…)
.then(instance => {
const { documentViewer, annotationManager } = instance.Core;

// Add header button that will get file data on click
instance.UI.setHeaderItems(header => {
  header.push({
      type: 'actionButton',
      img: '...',
      onClick: async () => {
        const xfdfString = await annotationManager.exportAnnotations();
        const options = {
          filename: 'myDocument.pdf',
          xfdfString,
          downloadType: 'pdf'
        };
        
        instance.UI.downloadPdf(options);
      }
  });
});

})

Would like to know how to download xfdfs.
Thanks in advance.

Heejung

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:

Hi there!

Sorry for the delay - I was away for a few days (It was a long weekend here in Canada).

The functionality you are trying to do is not supported in PDF.js Express without the use of the rest API.

If you need to merge XFDF into a document, please see this guide.

Thanks!
Logan

Hi Logan,
We will try it.
Thank you!

1 Like