In addition to its marquee features, OS X Mavericks brings a ton of minor improvements to Apple’s desktop operating system. The Unofficial Apple Weblog detailed one of these improvements this morning: the ability to save a document or webpage directly to a PDF from the File menu. OS X has long had excellent built-in support for the creation of PDFs, but users previously had to access the functionality from the Print window. Now, with the ability to “Export as PDF” from the File menu in a single step, the process is fast and simple.
But we can take it one step further than TUAW by creating a custom shortcut. We’ll use OS X’s keyboard preferences to create an “Export to PDF” shortcut, allowing us to save our documents and webpages on the fly.
To create your shortcut, head to System Preferences > Keyboard > Shortcuts > App Shortcuts. Click the plus icon to access the shortcut creation dialog. If desired, you can limit this new shortcut to a specific application, like Safari, but since we want to be able to create PDFs in any supported app, we’ll leave it set to “All Applications.”
Next, you need to tell the system which menu function you want to create a keyboard shortcut for. This can be tricky, because you have to type the menu’s command exactly in order for the shortcut to work. In our case, the exact name of the command is “Export as PDF…” (including the ellipsis). Enter your target menu command in the “Menu Title” box. Note: if you need an ellipsis, as we do in our example, you’ll have to enter the symbol for one; three periods won’t work. The keyboard shortcut for an ellipsis is Option-; (semicolon).
Once you’ve entered the correct menu command, you’ll next need to choose an appropriate keyboard shortcut. You’ll want to avoid common shortcuts so think carefully about one that is unique and easy to remember. In our example, Command-P is already taken for the Print command, so we chose Command-Shift-P for our PDF export shortcut.
Once you’re done, press Add to create the shortcut. You’ll now be able to use it to create a PDF document in any supported application with a quick set of keystrokes.