Section:
Overview
Get Started
Without Viewer
FAQ
Opening Documents
Load/View Tiff
Saving Annotations
Measurement
Signature
Document Search
Redaction
Coordinates
Stamp content
Watermark
Remove images
Reading content
Write content
Replace page content
Graphics state
Edit Text
Replace Text
Convert Documents
Import/Export
Create form fields
Remove form fields
Modify form fields
Fill form fiellds
Style form fields
Form flatten
Date picker
Embedded JavaScript
APIs
WebViewer Events
Annotation Events
Text Select Events
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?