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

Extracting pages from PDF based on search results using javascript in Acrobat

New Here ,
Nov 18, 2019 Nov 18, 2019

I have a file that has serveral pages. At random intervals there are pages that have the words "PageBreak". Looking for a script that will search my file from the begining for the "PageBreak" then extract all pages before and including the pagebbreak, then continue through the rest of the file repeating that same process until all pages have been extracted to new files. I have attached a file. 

On the file pages 1 and 2 would be extracted to a new file, then pages 3-5 would be extracted to another new file and so on. can anyone help?

I have looked through the community board and did not find anything that can help me with this.

TOPICS
Acrobat SDK and JavaScript
1.5K
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 ,
Nov 18, 2019 Nov 18, 2019
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 ,
Nov 18, 2019 Nov 18, 2019

I looked at this , I'm not sure I am following what they are doing.

I do not wantto add any pages I just want to extract pages as separate files.

But from the titla it would seem that is what I am looking for.

 

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 ,
Nov 18, 2019 Nov 18, 2019

Sorry for the misspellings I am a terrible typist

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 ,
Nov 18, 2019 Nov 18, 2019
LATEST

There are a couple ways you can go about creating a solution. 

First, what you have stated is not a page extraction issue, but rather a PDF splitting issue. So if you search on PDF splitting you'll find more relevant information. 

 

1. Write, or hire someone to write, an Acrobat Automation script for this, such as the one Bernd points out.

2. Purchase a tool from a 3rd party vernder that does page splitting, such as EverMap.

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

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