Which product are you using?
PDF.js Express Plus
PDF.js Express Version
Core Version: 8.7.4
Detailed description of issue
We load PDFs and allow users to annotate and reply via the PDF.JS UI. We have a download button that’s implemented by calling the /merge endpoint to merge all annotations into the PDF. Finally, we download with the URL from the API response.
When a user leaves a comment and then replies to it, the reply is “nested” correctly in the UI. But when downloading and opening the PDF in Adobe, the reply is a top-level comment. I checked the xfdf string, we pass to the API and it has the “inreplyto” set on the reply in question (we don’t create those xfdf strings ourselves though, see code).
Expected behaviour
I’d expect the reply to appear as a reply in Adobe after download.
Does your issue happen with every document, or just one?
All
Code snippet
const { docViewer, annotManager } = pdfInstance;
const fileData = await docViewer.getDocument().getFileData({});
const blob = new Blob([fileData], { type: 'application/pdf' });
const xfdf = await annotManager.exportAnnotations({ annotList: annotManager.getAnnotationsList(), links: false, widgets: false });
const data = new FormData();
data.append('xfdf', xfdf);
data.append('file', blob);
data.append('license', '...');
const response = await fetch('https://api.pdfjs.express/xfdf/merge', {
method: 'post',
body: data,
}).then((resp) => resp.json());