Skip to main content
nicks57522602
Participant
May 24, 2021
Answered

How Do I delete multiple pages within a PDF?

  • May 24, 2021
  • 1 reply
  • 2191 views

I have a file of groups of 6 pages (149 groups of 6) where I need to delete the 5th and 6th page, then the 11th and 12th, and so forth, but retain the balance of the document.

How do I do this with an Action Tool Javascript?

 

This topic has been closed for replies.
Correct answer try67

You can do it with this code:

 

for (var p=this.numPages-1; p>0; p-=6) {
	this.deletePages(p-1, p);
}

1 reply

try67
Community Expert
try67Community ExpertCorrect answer
Community Expert
May 24, 2021

You can do it with this code:

 

for (var p=this.numPages-1; p>0; p-=6) {
	this.deletePages(p-1, p);
}
Participant
May 6, 2022

Nice but wheredo I enter this code?

try67
Community Expert
Community Expert
May 6, 2022

You can run it from the JS Console: https://acrobatusers.com/tutorials/javascript_console