Open multiple pdf files in separate staggered windows in a single app on a Mac

command linemacospdf

How can I open from the command line on a Mac more than 15 pdf files, 1 file per window, in separate staggered windows in a single app?

I am using Preview as the default pdf viewer. I have not explored other pdf viewers. I prefer a solution with Preview for simplicity, but I am open to using other pdf viewers.

I have tried commands below. Up to 15 files, it works fine in Preview. But file number 16 and subsequent files open as separate tabs in the existing windows (I want to open them in separate windows, not tabs):

open file1.pdf file2.pdf ...

or

open file1.pdf
open file2.pdf
...

By contrast, the commands below open multiple instances of the same app (Preview). And the windows are on top of each other (not staggered). So this does not work for me either:

open -n file1.pdf
open -n file2.pdf
...

I cannot use Finder to select and open files. The file names above are printed into STDOUT by running a different command. I am trying to open 20-40 such files at the same time, out of 1000s of files in one directory.

I am using these settings:

System settings:

Desktop & Dock > Windows > Prefer tabs when opening documents = never

Preview:

Settings > Images > Open each file in its own window = yes

See also:

Best Answer

A user here mentions that the Window menu still behaves like each tab is a separate window: https://discussions.apple.com/thread/253901021, so the behavior should be unique to Preview and not affect other pdf viewers.

These work:

  1. Install another pdf viewer app like Skim

  2. Then in the Terminal: open -a /Applications/Skim.app file1.pdf file2.pdf ...

  3. (optional) In Skim: hold the Option key + Window | Arrange in front. The windows are now tiled even more neatly (in a single cascading set).

Related Question