On this page
Guides
Extract Pages
This example shows how to extract pages:
javascript
// Extract the first, third, and fourth pages of the original document and save it in a new document.
const pagesToExtract = [1, '3-4']; // Extract the range of the page.
const data = await docViewer.extractPages(pagesToExtract);
//You can save the blob to a file or upload to a server
const blob = new Blob([data], { type: 'application/pdf' });