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

When extracting pages from PDF in Adobe, how do I select multiple pages and produce one file?

New Here ,
Jan 12, 2024 Jan 12, 2024

When extracting pages from PDF in Adobe with javascript, how do I select multiple pages and produce one file?

example     I want pages  14, 300, 453, 1000, 6000 and produce one file with these pages

Also, how do I start the index at 1, so these numbers match.

 

Thanks so much for the help.

 

John

TOPICS
Acrobat SDK and JavaScript
431
Translate
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 ,
Jan 12, 2024 Jan 12, 2024

Delete unwanted pages and save the file with a new name. 

Translate
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 ,
Jan 12, 2024 Jan 12, 2024

Thanks for the advice Bernd.

I am trying to use javascript to exact mutiple pages and save a file of those choosen pages.

I have a code to pull one page, but I don't know how to pull mutiple pages.

 

Translate
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 ,
Jan 12, 2024 Jan 12, 2024

You can extract multiple pages when you specify the start and end parameters. 

Translate
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 ,
Jan 12, 2024 Jan 12, 2024

Hello again,

 

I tried using both of those options.

If I use this;

this.extractPages({nStart:3, nEnd:6, cPath: "TEstExtract.pdf"});

I get pages 3 to 6, but what if I want to take pages 1, 9, 100, 10000?

 

Thanks

John

Translate
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 ,
Jan 12, 2024 Jan 12, 2024
LATEST

There are two ways to do that:

- Delete all the other pages in the file and then save it under a new name.

- Create a new file and import the desired pages into it, then save it (after deleting the first blank page that is added by default).

I've developed a (paid-for) tool that does the latter. All you need to do is provide it the list of pages to extract, either one at a time, or in ranges ("1-10, 20, 100-200" for example):

http://try67.blogspot.com/2011/04/acrobat-extract-non-sequential-pages.html

 

Translate
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