top of page

Javascript to get PDF page counts


George Johnson has posted javascript on the Adobe forum here, which you can use in Adobe Acrobat to get the page counts of multiple PDFs. Follow these steps, in Adobe Acrobat XI:

1. In the Tools console, go to Action Wizard and select 'Create New Action'.

2. Choose More Tools . . . Execute Javascript and click it into the 'Action steps to follow' area on the right. Uncheck the 'Prompt User' box, and click in 'Specify Settings'.

3. Enter this script in the Javascript Editor:

console.println(documentFileName + "\t" + numPages);

4. Name and save the action.

5. When you click on the new action in the Action Wizard menu, you will be prompted to select multiple PDF files.

6. Click start and Acrobat will start to open the files and generate a list of their page counts.

7. Close the action and go back to the Tools console. Select the JavaScript menu., and click on Javascript Debugger.

8. Select 'Console' in the View menu. A list of the PDF file names and their page counts will be displayed. You can easily copy this and parse it out in Excel.


Sean O'Shea has more than 20 years of experience in the litigation support field with major law firms in New York and San Francisco.   He is an ACEDS Certified eDiscovery Specialist and a Relativity Certified Administrator.

​

The views expressed in this blog are those of the owner and do not reflect the views or opinions of the owner’s employer.

​

If you have a question or comment about this blog, please make a submission using the form to the right. 

Your details were sent successfully!

© 2015 by Sean O'Shea . Proudly created with Wix.com

bottom of page