Forum moved here!

# Home / Multiple separate windows needed

biff

I need SumatraPDF to open two separate pdf files in two separate windows on the same screen so that I can compare information in two price lists with each other. Is there a setting like “open in new tab” or something?
I currently can only have one pdf file open at a time.

GitHubRulesOK

[UPDATE]
The following suggestions were made before the addition of the -new-window (CLI) and CTRL+ [shift] + N requested features added in version 3.2

Skip to the latest posts below to check more recent comments. Then if you still want other customized ways to achieve different come back to follow the thread

I guess you mean something like this

[Sorry ! screenshot missing as server has removed older images !]

Its very easy to drop 2 files onto ONE shortcut e.g a pair of image files to compare or 2 versions of a pdf

My SumatraPDF folder is called “Twin Viewers” because I use 2 different Portable versions however this should work with any combination (why not have one window as the pre-release with mark-up feature)

1. create a text file as shown below, the filename is not important but it must be .bat or .cmd YOU DONT NEED BOTH I am just testing it in different configurations, there needs to be one copy of Sumatrapdf.Exe (portable) in that folder too.
2. make a SUBfolder directory called Viewer2 (note if you change the name you need to change parts of the CoMmanD or BATch file to match
3. COPY SumatraPDF.exe into that folder NOTE you DONT NEED to copy the cache folder or settings file but it usually helps.(ON FIRST RUN it will create them for you)

Best way to set it up is drop any 2 files onto the command, you may think it has not worked since both copies will likely be one over the other,

1. move one view to left and second to right now when you close them they each remember their positions

2. If you want a shortcut on your desktop right click the bat or cmd file and select send to … desktop as shortcut

now you can open any folder of documents pdf chm epub png and drag any 2 to drop on the shortcut like this
et voilà!
[Sorry! many screenshots have been lost, too long to rebuild for all historic cases]

for cut’n pasters here it is but don’t blame me (however likes are accepted )

    start "Left" "%~dp0SumatraPDF.exe" "%~1"
start "Right" "%~dp0Viewer2\SumatraPDF.exe" "%~2"

SumatraPeter

This has been a planned feature ever since the tabs UI was implemented, but don’t expect it anytime soon. Relevant issue (with lots of duplicates):

ismael

This would be all the more relevant today with Windows 10 allowing Virtual Desktops.
When I open a pdf file in one desktop, it redirects me to the instance of Sumatra opened on the second virtual desktop.

jamesthebud

I found an easy way of creating multiple windows.

Go to the folder where the Sumatra exe file is located, then make a copy of that file in that folder and rename it, maybe something like Sumatra2.exe. Then make whatever shortcuts on your desktop and/or in your start menu that you want, and name them dfferently to your original Sumatra shortcuts. To open a new instance of Sumatra just open these new Sumatra2 shortcuts as you would normally use any shortcut. It seems to work just fine.

SumatraPeter

That’s basically what @GitHubRulesOK suggested above, i.e. using two portable version copies (or one installed and one portable), and the advantage of doing it that way is that the two copies can each have their own different settings.

GitHubRulesOK

Just beware that two apps in the same folder even if renamed will normally fight over who is in control of the settings file or cache, which is why its not normally recommended
As you point out SumatraPDF will usually tolerate this dual use and as one changes the settings or history the other will often follow. The major downside is that on start-up the two will read the same start-up position hence my suggestions above to keep a separate copy, however the downside is the file open histories are different.

IF you are careful you can setup multiple session folders as per

using separate versions of SumatraPDF.exe in the one folder with -appdata pointing to separate locations thus say one version 3.0 for printing or pre-release for highlights etc

arjunpaudyal

With my version, (3.1.2) there is a feature built in.
Sumatra Menu >> Settings >> Options
Look for Use Tabs and uncheck that.

Works well for me. Every PDF/File I opened opens in Different Window.

For Settings file,
use:

UseTabs = false

GitHubRulesOK

You can have two shortcuts to SumatraPDF see Sessions in sumatra

The first one can be with tabs on (allows you to use the second one with tabs off) thus keeping only say half a screen active at a time but if you want a third window just run the second one again. You can then pick and choose to drag and drop between one tabbed and multiple non tabbed

GitHubRulesOK

NOTE
A number of changes have been made to opening a new window starting with version 3.2

The new way to open a second window is using either CTRL + N or CTRL +SHIFT + N or when using the command line you can use -new-window as an option.

However, there can be a few “quirks” due to delayed recognition of settings especially if you are changing “Use Tabs”.between two initially tabbed windows.

If you need tabs in one and no tabs in the other, then you will need to use two executables as described above.

Danijel

Quite often I need to view two documents side by side. It would be great if this could be done within the same SumatraPDF window.

Currently no PDF viewers can do this on Windows. PDFexpert does it on OSX: split-view.

Thanks for the great PDF reader.

GitHubRulesOK

Window splitting was attempted as a 3rd party fork for a short while a long time ago then abandoned (possibly high maintenance to keep split windows under dual control, e.g. when scrolling mouse which has focus etc.)
An old trick was to have split browser frames but that’s no longer possible.

Currently, you can have same or different file in two separate windows open without Tabs

or run same or different file in two copies with/without tabs and several means to control that have been suggested in this forum and GitHub

The latest version 3.2 makes this much easier by allowing CTRL SHIFT N to open same file in a New window or CTRL N to open a second New window and you can select any file or open and jump to stored page in Favorites

Romko-M

I use SumatraPDF v.3.1.2 64-bit. Ctrl+N does not work. Neither Ctrl+Shift+N does. Command line option -new-window is not recognized and is interpreted as a file name, although other command line options work. The option ReuseInstance = false in SumatraPDF-settings.txt is ignored.

GitHubRulesOK

The “new” window feature (including on the command line) is only available in 3.2+ formal releases or 3.3+ prereleases.
ReuseInstance is a legacy command related to untabbed mode in LaTeX, however I always suggest it is kept = true for tab mode too.

Romko-M

Much thanks! Now it’s great. Did not know about 3.2 because menu Help → Check for Updates in 3.1 said ‘You have the latest version’ .
By the way, the dating format isn’t clear to me. Say, Mar 11 means current year, I guess, but what is the date of Jan’19 then?

GitHubRulesOK

You have the latest update with 3.1.2 since updates were not triggered for 3.2 (it’s such a big change it’s still going through bug fixes)

Yes those dates are confusing Mar 19 = this year, but Mar '19 = last year !

Romko-M

Surely, but actualy not so much confusing, nevertheless, where’s the day of the month in Jan’19 hidden?

GitHubRulesOK

I guess the dates are dropped but there is a sequence in the server numbering or we would get a mix up inorder of replies

date=2020-07-13 2020-07-12T23:00:00Z