Page Splitter Redux

One of my more popular blog posts was about splitting PDF pages. I wrote that post five years ago and I am still getting regular feedback and questions.

The original script was written for Acrobat 9, and used the “Documents” menu for it’s menu item. Since then, the Acrobat user interface was changed considerably, and there is no longer a “Documents” menu. It’s not too complicated to move the menu to the “Edit” menu, but most of my readers don’t have JavaScript programming experience, and source code does look a bit intimidating if you don’t work with it every day.

In Acrobat X and XI we also have a different method of running the script: We can create an Action using the Action Wizard that takes one or more documents and creates new documents with the split pages. The biggest advantage an Action has is that you can install it by just double-clicking on the SEQU file. The biggest disadvantage of an Action is that it only works for Adobe Acrobat Pro – the Standard version does not support Actions.

So, let’s take a second look at the page splitter script and make it easier to install for users of Adobe Acrobat X or XI.

If you have Adobe Acrobat Pro, then use the following links to download the Action file. It will have a .sequ file extension, and when you double-click it, it should ask you if you want to install it in Acrobat.

You can install and run the Acrobat X Action in Acrobat XI, but you will not be able to edit it. The actions will automatically split one or more documents and will save the document with a “-split” added to the original filename in the same directory that the original document is stored in. So, if you have a document named scan.pdf, you will get a new file that is called scan-spit.pdf in the same directory that scan.pdf is stored in. For Acrobat XI Pro users, installing the Action is the easiest way to get access to this functionality.

If you are interested in the updated folder level script, you can download it from here: splitpages.js

This file needs to be installed in one of the two Acrobat JavaScripts directories on your system. See my previous blog post about where folder level JavaScripts have to be stored for more information.

To make things easier, try to install the script in the application level JavaScripts directory. This directory should always be there, whereas the user directory may have to be created by you. Let’s assume you are installing the script in Acrobat XI, the JavaScripts directory should exist in one of these two locations on a Windows system:

C:\Program Files\Adobe\Acrobat 11.0\Acrobat\Javascripts

 

C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts

On a Mac, the corresponding directory would be (this is a long path, so you will have to scroll):

/Applications/Adobe Acrobat XI Pro/Adobe Acrobat Pro.app/Contents/Resources/JavaScripts

If you are running Acrobat on Windows, and you don’t want to deal with figuring out where to install the scripts, you can use an installer I’ve created – all it does is trying to figure out where Acrobat’s JavaScript directory is, and install the script. Download the installer from here. If you have multiple versions of Acrobat installed, the script will only be installed in one version.

After this script is installed, and you restart Acrobat, you should find a new menu item at the bottom of the “Edit” menu in Acrobat. Differently from the Action, the “Split Pages” function will create a new document, but will not save it. It’s the user’s responsibility to save this file.

In order to get this folder level script to run, you need to change one setting in Acrobat’s Preferences: Bring up the Preferences dialog, then go go the JavaScript category:

2014 04 28 12 36 05

Now enable the settings “Enable menu items JavaScript execution privileges”. Without this setting, you will get an internal error when trying to run the function.

This entry was posted in Acrobat, JavaScript, PDF and tagged , , , . Bookmark the permalink.

10 Responses to Page Splitter Redux

  1. John Terdik says:

    OK I really like the idea but for reasons I don’t understand it is not working for me.
    1) First I manually created the splitpages.js file in C:\Program Files (x86)\Adobe\Acrobat 11.0\Acrobat\Javascripts, restarted and I did NOT see the Splitpages in the Edit dropdown.
    2) I downloaded the splitpages.exe file, closed Acrobat, ran the EXE file, started Acrobat XI (I’m running Win10 x64), open my file, clicked the Edit, in the dropdown I still do not see SplitPages. Forgot to mention I did update the preferences as document above.
    3) Using Everything (search tool) I looked for Splitpages.js and there is only one file and it is in the correct folder per the instructions above.

  2. Karl Heinz Kremer says:

    John,

    I would add a debug alert message in the script to see if it gets loaded at all. You can do this by adding “app.alert(“script is loading”);” to script, but make sure it’s outside of any function body.

  3. Kelly says:

    Thank you!!!! I’m a librarian and we often scan 2 pages at once from books, this script has made my job so much easier!!!

  4. Steve Xu says:

    Hi John,

    Thanks for the file! It works like a charm. However, sometimes the middle of two pages is not actually the middle of the pdf file, and the result pdf has pages that include a bit of the next page. Is there anyway to customize the position of the cut? Thanks

  5. Karl Heinz Kremer says:

    Steve, as long as the position where you need to make the “cut” is predictable or calculable, you can adjust the JavaScript. You will run into problems when the two pages that are on one sheet are not of the same size.

  6. Agus says:

    Karl, Nice as others have said it works like a charm, but I needed to right click the link to the XI version and download directly to get access to the action. Then it is not fully updated to DC but it works inside the Action Wizard set. Thanks a lot

  7. Karl Heinz Kremer says:

    Agus, right-clicking to download is a pretty standard command in many browsers. Actions from older versions of Acrobat can be executed in a newer version, but it cannot be modified. That’s the case when going from e.g. Acrobat X to XI as well.

  8. Tricia says:

    Hi Karl, how can I make it work under macosx?

  9. Karl Heinz Kremer says:

    Tricia, this should work on a Mac as well. Look through the page, there is the path you need to use for installing it on a Mac. Keep in mind that this article is more than 3 years old, and was written for Acrobat XI, so if you are trying to use this with Acrobat DC, you need to adjust the path.

  10. Tricia says:

    Hi again, please don’t worry about my question, after some research I’ve found the way…Thanks!!!

Leave a Reply

Your email address will not be published. Required fields are marked *