Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create keyboard shortcuts for the Print - PDF menu System
Just stumbled upon this one ... some time ago, I was attempting to write an AppleScript to choose the Save As PDF... option in the Print dialog box of Safari. After searching all of the scripting sites, I worked out a solution, but it was a kludge that involved System Events and "click at" coordinates.

I was playing around with the Keyboard and Mouse Preferences pane, and decided to try adding an Application keyboard shortcut for Safari. I just typed in Save as PDF... (no quotes, and type the ellipses by hitting option-semicolon) -- and it worked! I made the shortcut Command-Option-Control-P. So now to save a web page as a PDF, I can type Command-P and then Command-Option-Control-P to bring up the Save box to save the PDF. No more having to use the mouse/trackpad to select this.

[robg adds: This works in both 10.5 for sure, and almost but not quite in 10.4 -- you can see the shortcuts in the menu, but they only work if you first activate the menu -- at least, I think that's what's happening. If you have it working in 10.4, please comment. This is an amazingly useful tip, as you can do this for any of the entries in that menu -- I set Control-Command-M to Mail PDF, for instance. I set the shortcuts up for All Applications, since those menu choices are the same in every app, and now I can print and mail PDFs without touching the mouse.]
    •    
  • Currently 3.10 / 5
  You rated: 5 / 5 (10 votes cast)
 
[28,471 views]  

Create keyboard shortcuts for the Print - PDF menu | 18 comments | Create New Account
Click here to return to the 'Create keyboard shortcuts for the Print - PDF menu' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create keyboard shortcuts for the Print - PDF menu
Authored by: siren77 on Oct 26, '07 01:06:52PM

can this shortcut be added to any app that prints?



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: osxpounder on Oct 26, '07 02:48:11PM

When 10.5 has gone through a shakedown cruise, and I'm finally ready to install it, I'll be really glad you found this. I have wanted a keyboard combo to Save to PDF for years! Thanks.



[ Reply to This | # ]
tiger
Authored by: ra5ul on Oct 26, '07 03:14:46PM
this works on my mac (tiger), with two caveats:
  • it only works in apple's own apps (e.g. terminal, but not camino), even if you apply the shortcut to one specific app.
  • the shortcut has low precedence, so the keystroke must be unique.
otherwise you're stuck with the useless method of having to click the button first to activate the shortcut. still, even for tiger, it's a nice hint.

[ Reply to This | # ]
Keyboard shortcut for the Print - PDF menu in Tiger
Authored by: Jai Gill on Oct 26, '07 03:51:50PM

I tried to do this in Tiger 10.4.10 both as an application keyboard shortcut for all applications (which did not work), then having deleted that, as a shortcut specifically for Safari which again did not work. Other than the default set, I have no other shortcuts defined.

Where could I be going wrong?

---
JG



[ Reply to This | # ]
Keyboard shortcut for the Print - PDF menu in Leopard
Authored by: Jai Gill on Oct 26, '07 04:20:29PM

Works great in Leopard though! Just set it up on my MacBook Pro which I upgraded last night (Sydney, Australia time...)

---
JG



[ Reply to This | # ]
Keyboard shortcut for the Print - PDF menu in Leopard
Authored by: mantrid on Oct 27, '07 07:13:23AM

My experience in 10.4 (PPC) is pretty much identical to that of ra5ul. It works just fine in 10.4 with Apple apps but non-Apple apps vary - eg. Shiira works, Firefox doesn't.

So the question is, is that what has changed in 10.5? Does the hint now also work in the above mentioned and other non-Apple apps in 10.5 (FireFox, Camino, etc.)?



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: broomdodger on Oct 27, '07 06:50:38AM

This work great with Tiger, I used Terminal to set the shortcut.

Copy these three (3) lines, QUIT Safari and paste into Terminal.

defaults write com.apple.Safari \
NSUserKeyEquivalents -dict \
"Save as PDF..." "@^P"

The '...' is really three (3) dots NOT an ellipses.

The key to using it is to FIRST use command+P to open the print dialog, then command+control+P to select 'Save as PDF...'

These are the characters used to select modifier keys

@ for Command
~ for Option
^ for Control
$ for Shift



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: metiure on Oct 27, '07 08:21:05AM

In TextEdit and Safari (Leopard), this only works once the Print Dialog is opened. I presume it's a general behaviour.
Did I understand something wrong?



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: jvoskuil on Oct 27, '07 09:14:55AM

Works perfectly for me in 10.4.10. For those having trouble, be sure to note these details of the hint: You need to type the ellipsis (three dots) using Option-semicolon; and to make it work you first press Command-P and then the key combination you assign.



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: jvoskuil on Oct 27, '07 09:19:45AM

Sorry, I take back the part about using Option-semicolon. It doesn't seem to make any difference whether you do that or type three periods.



[ Reply to This | # ]
In Tiger you need to quit Safari and restart it
Authored by: ars on Oct 27, '07 10:55:53AM

It , i.e. the Save as PDF, did not work at first in Tiger 10.4.10, but then I quit and restarted Safari and it works.



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: ronbellie on Oct 27, '07 11:32:10AM

I've been wanting to create a keyboard shortcut for e-mailing a Word file as a PDF (sending the attached file to Apple Mail as an attachment.) I can't figure out how to do this. I do it frequently and would love to not have to use the mouse. It would save me loads of time

Any ideas?



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: morespace54 on Nov 28, '07 07:41:52AM

I think you'll need an Applescripts (or Automator action or something else) to do this as it required two (2) different actions:
1. Print as PDF -- Finder.app
2. Send PDF (or file) to Mail (as an attachment) -- Mail.app



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: MrWrong on Nov 28, '07 04:11:00AM

I find it easier to make the shortcut cmd-p so that i just type it twice to print to pdf.



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: Jai Gill on Nov 09, '08 05:16:44PM
I like that! However, anyone got a way for making this a 'universal' option that works whenever a print dialog box appears rather than an application specific one? I don't want to have to keep adding this one item for every application I use...

---
JG

[ Reply to This | # ]

All Applications
Authored by: Krioni on Jul 25, '09 09:14:30AM
You can get this for all applications by choosing All Applications, rather than one specific application, as robg mentions in his comment on the hint.

---
http://www.danshockley.com

[ Reply to This | # ]

Create keyboard shortcuts for the Print - PDF menu
Authored by: dcottle on Aug 02, '09 02:09:26PM

I can't believe it's taken me this long to find this hint. I've been trying to figure out a way to do this for years.



[ Reply to This | # ]
Create keyboard shortcuts for the Print - PDF menu
Authored by: robray on Sep 28, '11 10:05:26PM

Dang. not working for me in Snow Leopard.



[ Reply to This | # ]