How can I create a shortcut to open Safari PDF in Preview?

If I open a PDF file in Safari (say, from a website), it is shown in a browser window or tab, and from there I can hover over the bottom of the page and from there click on this overlay to open the PDF in Preview:

enter image description here

How can I make a shortcut (or alternatively, write an AppleScript), so that I can open the PDF in Preview directly, without hunting around for the overlay and clicking the pointer on the appropriate icon in the overlay?


  • General tab in Safari preferences.

    Open “safe” files after downloading

    In Safari, automatically open the listed types of files but not software.

    https://support.apple.com/en-in/guide/safari/ibrw1072/12.0/mac/10.14.5

  • I don't know if you count right click as "hunting around", but you can right click on an empty part of the PDF and select "open with preview". Note that the point of click shouldn't be surrounded by content of the PDF.

  • You can always use Automator with or without AppleScript to do the same and then bind a shortcut with that Service/ Quick Action.