Did you find this guide helpful?
Some test text!
Web / Guides / Remove pages
Pages can be removed from the PDF document using the removePages function.
WebViewer(...)
.then(instance => {
const { documentViewer } = instance.Core;
documentViewer.addEventListener('documentLoaded', async () => {
const doc = documentViewer.getDocument();
const page1 = 1, page2 = 2, page3 = 3;
documentViewer.getPageCount(); // 3
await doc.removePages([page2]);
documentViewer.getPageCount(); // 2
})
});
Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales