These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Extract PDF pages that contain non-continuous page numbers

rocky
Registered: Jun 11 2009
Posts: 9

Hi all,

I know that we can create an Acrobat script that can extract multi-page PDF file into separate single-page PDF files. And we can append the page number into single-page PDF file's names. For example, if I have a PDF file named "document.pdf" which contains 5 pages in it, so the output single-page PDF files could be :

document1.pdf
document2.pdf
document3.pdf
document4.pdf
document5.pdf

The problem that I face now is the multi-page PDF file may contain non-continuous actual page numbering (page numbers as printed). For example, a multipage PDF document that contains 5 pages with actual page numbers are 3,4,6,7, and 10. Using the Acrobat script to extract this PDF file, the output single-page PDF files could be :

document1.pdf
document2.pdf
document3.pdf
document4.pdf
document5.pdf

But actually what I want is the output single-page PDF files keep contain that real actual page number in their filename, so they could be :

document3.pdf
document4.pdf
document6.pdf
document7.pdf
document10.pdf

How can I achieve this?

Any idea on this?

Any suggestions or help will be appreciated.

Thank you!

Rocky

My Product Information:
Acrobat Pro 8.0, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
The file naming can be automated if there is a way for the script to know what the page numbers are. Is there number on the pages in a predictable location?

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script