Toggle 'Show Cover Page During 2-up' in Acrobat

Dec 09, '08 07:30:00AM

Contributed by: zoopiedoop

When viewing book PDFs with the facing-pages (two-up) view option, one usually wants left-facing pages to be on the left so that spreads are viewed as they would be in a printed copy. Unfortunately, Acrobat 8 often defaults to the opposite. This simple AppleScript toggles the View menu option Show Cover Page During 2-up:

--Toggle 'Show Cover Page During 2-up' option

tell application "Adobe Acrobat Professional"
  activate
  tell front document
    tell application "System Events"
      tell process "Adobe Acrobat Professional"
        
        tell menu bar 1
          tell menu bar item "View"
            tell menu 1
              tell menu item "Page Display"
                tell menu 1
                  click menu item "Show Cover Page During Two-Up"
                end tell
              end tell
            end tell
          end tell
        end tell
      end tell
    end tell
  end tell
end tell
With a keyboard shortcut assigned to it via an application like the wonderful and free Spark, you are one keystroke away from proper two-up viewing. Note that this script employs GUI scripting, which is turned off by default. Here's how to enable it.

[robg adds: When I read this hint, I thought 'Well, that's sort of overkill; why not just assign a keyboard shortcut using the Keyboard Shortcuts panel in System Preferences?' While I don't have Acrobat Professional, I tested using Adobe Reader, and found that the app won't let you assign shortcuts -- if you try, you'll see a message that says 'You cannot add keyboard shortcuts for the application Adobe Reader.' Digging in the app's info.plist file, there's a key named UIDisallowUserKeyboardShortcuts that's set to TRUE. I tried changing it to false, then moving the app and relaunching, but I still got the same message. So it looks like GUI scripting is the only way to do this...]

Comments (2)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20081205121929624