Section:
Overview
Insert pages
Remove pages
Rotate pages
Crop pages
Reorder pages
Extract pages
Merge files
Thumbnail controls
Pages can be removed from the PDF document using the removePages function.
1// config.js2const { documentViewer } = instance.Core;34documentViewer.addEventListener('documentLoaded', async () => {5 const doc = documentViewer.getDocument();6 const page1 = 1, page2 = 2, page3 = 3;78 documentViewer.getPageCount(); // 3910 await doc.removePages([page2]);11 documentViewer.getPageCount(); // 212})
1// config.js2const { docViewer } = instance;34docViewer.on('documentLoaded', async () => {5 const doc = docViewer.getDocument();6 const page1 = 1, page2 = 2, page3 = 3;78 docViewer.getPageCount(); // 3910 await doc.removePages([page2]);11 docViewer.getPageCount(); // 212})
Did you find this helpful?
Trial setup questions?
Need other help?
Pricing or product questions?