PDF is displayed without previous annotations

Which product are you using?
PDF.js Express Plus

PDF.js Express Version
7.0.1

Detailed description of issue
We open a PDF that contains annotations that are visible in Adobe PDF, but they are not displayed using PDF.js.
I’ve tried changing disableFlattenedAnnotations, but it doesn’t work.

Expected behaviour
This is what it should display:

Does your issue happen with every document, or just one?
This is the first time that we try to open a PDF with embedded annotations.

Link to document
{Provide a link to the document in question if possible}

Code snippet
WebViewer({
path: ‘/static/lib’,
initialDoc: FILE_NAME,
disableFlattenedAnnotations: false,
}, element).then(instance => {

const { docViewer, annotManager, Tools, Annotations, PDFNet, CoreControls } = instance;

// Document needs to be loaded before we can import annotations
instance.docViewer.on(‘documentLoaded’, async () => {

documentStream = await instance.docViewer.getDocument().getFileData({});
documentBlob = new Blob([documentStream], { type: 'application/pdf' });

})

})

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:

Hello hector.surjan,

  1. Are you able to send the file that is causing this issue? or can you send the XFDF from the document?
  2. I see youre using getFileData(), if you are trying to load the document that is returned from this function, you need to pass in the XFDF into the object like: getFileData({xfdfString: xfdf}) in order to get the document with the XFDF embedded.

Best regards
Tyler Gordon
Web Development Support Engineer
PDFTron

Hello hector.surjan,

I was informed that this would require accessing the REST API instead,

Here is documentation on this: Extract XFDF using the Express REST API | Documentation
and some examples: Open a document, add annotations, download | Documentation

Best regards
Tyler Gordon
Web Development Support Engineer
PDFTron