Extracting pages from PDF based on search results using javascript in Acrobat
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Sorry for the misspellings I am a terrible typist
Copy link to clipboard
Copied
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.
Use the Acrobat JavaScript Reference early and often

