Product: webviewer sdk
Product Version: 10.11
Please give a brief summary of your issue:
Extracting pages from a document is not working , as we approached the same way how you have in your documentation.
Please describe your issue and provide steps to reproduce it:
Extracting pages from a document is not working , as we approached the same way how you have in your documentation.
const { documentViewer, annotationManager } = instance.Core;
documentViewer.addEventListener('documentLoaded', async () => {
const doc = documentViewer.getDocument();
const pagesToExtract = [2, 3];
// only include annotations on the pages to extract
const annotList = annotationManager.getAnnotationsList().filter(annot => pagesToExtract.indexOf(annot.PageNumber) > -1);
const xfdfString = await annotationManager.exportAnnotations({ annotList });
const data = await doc.extractPages(pagesToExtract, xfdfString);
const arr = new Uint8Array(data);
//optionally save the blob to a file or upload to a server
const blob = new Blob([arr], { type: 'application/pdf' });
});
Please provide a link to a minimal sample where the issue is reproducible: