How Do I delete multiple pages within a PDF?

New Here ,
May 24, 2021 May 24, 2021

Copy link to clipboard

Copied

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?

 

TOPICS
How to

Views

564

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 24, 2021 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);
}

Likes

Translate

Translate
Adobe Community Professional ,
May 24, 2021 May 24, 2021

Copy link to clipboard

Copied

You can do it with this code:

 

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

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

Nice but wheredo I enter this code?

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

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

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

Or from a Custom Command, if you have Acrobat Pro DC.

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines