AnswerBun.com

Automator: Open the current PDF file in Preview with another app

Ask Different Asked by Chang on December 4, 2020

After I open a PDF file with Preview, I want to open the same file in another PDF viewer (Skim or Adobe Acrobat). How can Automator do this?

One Answer

Here is an Automator Service/Quick Action that will open in Skim the front opened PDF document in Preview from the Preview > Services menu, or a keyboard shortcut if assigned in System Preferences > Keyboard > Shortcuts > Services.

This Automator Service was tested and works for me under macOS High Sierra assigning it a keyboard shortcut of ⌥⌘S, but should work as a Quick Action in macOS Mojave and later.

Example AppleScript code:

on run {input, parameters}
    tell application "Preview" to ¬
        set pdfDoc to (path of front document)
    tell application "Skim" to open pdfDoc
end run

Automator Service Workflow


Here is an Automator Service/Quick Action that will open the same PDF document(s) in both Preview and Skim from Finder.

In Finder, select one or more PDF documents, or a folder full of PDF documents and then right-click and select, e.g., Open PDF in Preview and Skim from the Services context menu.

This Automator Service was tested and works for me under macOS High Sierra, but should work as a Quick Action in macOS Mojave and later.

Example AppleScript code:

on run {input, parameters}
    tell application "Preview" to open input
    tell application "Skim" to open input
end run

Automator Service Workflow


Note: The example AppleScript code is just that and does not contain any error handling as may be appropriate. The onus is upon the user to add any error handling as may be appropriate, needed or wanted. Have a look at the try statement and error statement in the AppleScript Language Guide. See also, Working with Errors. Additionally, the use of the delay command may be necessary between events where appropriate, e.g. delay 0.5, with the value of the delay set appropriately.

Correct answer by user3439894 on December 4, 2020

Add your own answers!

Related Questions

How to get 1:1 scale in Keynote, Pages or Numbers?

1  Asked on January 6, 2022 by arivero

     

iPhone asks ‘Trust This Computer’ again

10  Asked on January 4, 2022 by amdyes

       

Turn off date suggestions in Reminders?

0  Asked on January 4, 2022

     

2019 MacBook Pro, Kernel panic

1  Asked on January 2, 2022 by ijustwanttousemymac

         

FUSE volume Finder window toolbar

0  Asked on January 2, 2022 by user3534974

   

Remapping keyboard shortcuts in Chrome and Firefox

4  Asked on December 31, 2021 by chris-upchurch

       

Mail.app Never finishes “Downloading Messages”

1  Asked on December 31, 2021 by timothy-r-butler

       

Uninstalled apps on iPhone still show up in Settings

1  Asked on December 31, 2021 by mut

 

Upgrade to Big Sur Beta 3 Broke Brew Build system

3  Asked on December 31, 2021 by stefano-mtangoo

       

nslookup & dig fail; ping, traceroute, and scutil -r work

4  Asked on December 29, 2021 by jhfrontz

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir