New script to output single pages to Interactive PDF

In InDesign CS5, if you output a facing pages document using the “Adobe PDF (Interactive)” export option, the facing pages always output as spreads. There isn’t any way in the user interface to choose to output individual pages instead of spreads.

But, I realized recently that in the scripting model there’s a command to toggle spread output on and off for interactive PDF export. So I whipped up a quick script to expose this.

Using the scripts is simple. If you want to make all future Interactive PDFs export as single pages, run the “InteractivePDFSpreadsOFF” script, and then export as many PDFs as you want using the “Adobe PDF (Interactive)” option. If at any point in the future you wish to output interactive PDFs as spreads, just run the “InteractivePDFSpreadsON” script.

Keith Gilbert

Keith Gilbert is a digital publishing consultant and educator, Adobe Certified Instructor, Adobe Community Professional, conference speaker, lynda.com author, and contributing writer for various publications. His work has taken him throughout North America, Africa, Europe, and Asia. During his 30 years as a consultant, his clients have included Adobe, Apple, Target, the United Nations, Best Buy, General Mills, Lands' End, and Medtronic. Follow him on Twitter @gilbertconsult and at blog.gilbertconsulting.com.

I didn’t try your script but it’s truly amazing the number of settings you can set through scripting without ever finding them in the UI.
I never used but noticed you could use datamerge in the native document instead of a new one :

Somehow, I completely forgot about that August post. That’ll teach me to do a little more searching before I post. I guess I was just so excited about running across the access to spread export (again) in the ID object model I just had to share it.

Thanks for pointing this out. The original post has a lot of good discussion about this topic.

Good point Harbs, but the solutions on that posting leave a lot to be desired. This seems to be a better solution that does not force you to change the document setup and still use the Export to PDF [Interactive] feature.
FvdGeest. Not sure how this messes up spreads. I am currently testing this and so far no issues. Could you elaborate?
Kieth, Great solution! Thank you for posting this.

Keith,
thanks for this script.
But I have a few questions.
When I place navigation buttons on a masterpage, they disappear in the PDF after using the script.
When I place navigation buttons on a document page, the buttons appear on in the middel of the page.
Dooes anyone have any experience with this behaviour.
Thnx.

@designspitz/@Ditte: I finally had a chance to test what you described, and you’re right. To clarify:

Running the InteractivePDFSpreadsON script works fine. But after running the InteractivePDFSpreadsOFF script, master page interactive buttons disappear or move toward the center of the page in the resulting PDF. The same thing happens with Harbs’ script, which is to be expected because both scripts make use of the same commands.

The only workaround I can suggest right now is that deleting the ID preferences files after running the InteractivePDFSpreadsOFF script makes the buttons move back to their original location in the next exported PDF.

The script isn’t doing anything to move the buttons in the resulting PDF. There is some undocumented “feature” or “bug” in the undocumented scripting call that we are using to turn PDF spreads on and off. Perhaps this is why Adobe doesn’t have a spreads option appear in the Interactive PDF export dialog box!

The script is cool, but forgive me if I am missing something. When I export an InDesign CS5 PDF from a book file, at the bottom of the screen is a pop-up menu that gives two options. The default, “Adobe PDF (Interactive),” exports in spreads only. But if you choose “Adobe PDF (Print),” you see the standard PDF export options, including the option to output in spreads (which, by the way, is not selected by default). If you export using Adobe PDF (Print), you will not by default end up with a PDF in spread format.

Hi! To add to the above, the CS5 scripts relating to single-page and spread outputs to interactive pdf do a rather odd thing in 5.5. They offset an actual video up and to the left so that it is off the page, although either the frame or a blank space is left on the page. You can see that this has happened by reducing the size of the pdf page when viewing it, so that the outside shows.

The only way I found to get round this while retaining the spread view in InDesign, was to offset the frame + video in InDesign by trial and error until it produced at about the right place. Then I gave up and went back to single spreads in InDesign. This is not a big deal at the moment, as running heads are the same on both sides, but it will be a problem with a different layout.

Same problem. Can’t use script because the script causes buttons to move to middle of the page over the type. Thanks for at least trying to solve the problem though. It’s very frustrating that Adobe hasn’t fixed the spreads problem in InDesign. I can’t even see a reason for outputting spreads as single pages much less making it impossible to have normal page spreads. If you’re making ebook PDFs (ePDFs) the only solution is to go back to InDesign 4.0 and scrap the Indesign 5.0 and 5.5 upgrades!