Skip to main content
Participant
November 18, 2019
Question

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

  • November 18, 2019
  • 2 replies
  • 1651 views

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.

This topic has been closed for replies.

2 replies

Thom Parker
Community Expert
Community Expert
November 18, 2019

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 PDFScriptingUse the Acrobat JavaScript Reference early and often
Bernd Alheit
Community Expert
Community Expert
November 18, 2019
gueyolAuthor
Participant
November 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.

 

gueyolAuthor
Participant
November 18, 2019

Sorry for the misspellings I am a terrible typist