• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

1.3K

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

Community Expert , 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);
}

Votes

Translate

Translate
Community Expert ,
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);
}

Votes

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?

Votes

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
Community Expert ,
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

 

Votes

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
Community Expert ,
May 06, 2022 May 06, 2022

Copy link to clipboard

Copied

LATEST

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

Votes

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