WebViewer v12.0.1
Situation:
- Multiple documents are loaded.
- Some have been modified in the viewer.
- The current tab shows an unmodified document.
- The user clicks our ‘save’ button, which needs to send all of the modified PDFs to the server.
All of our documents were loaded using something like this:
const document = await control.Core.createDocument(documentResource.url, { docId: documentResource.id });
const tabId = await control.UI.TabManager.addTab(document);
At save time we then do something like:
const tab = tabs.find(tab => tab.src?.getDocumentId() == documentResource.id);
// This fails:
const data = await tab.src.getFileData();
This fails for all tabs except the currently active tab: Unable to access Document id=null.
What’s the correct way to get the modified PDF data for non-active tabs?
Thanks!