Sumatra PDF is a PDF, ePub, MOBI, CHM, XPS, DjVu, CBZ, CBR reader for Windows

No preview in Windows Explorer

Since this is a frequently visited topic and there have been changes please note the following points.
The discussion above was about Preview Pane but it is the same system dll used to Show thumbnails of files on desktop and also when installed can be used by MS Outlook.

If your system is 64bit use 64bit installer UNLESS you are going to attempt to hook into a 32bit Outlook in which case you need 32bit.
This point alone needs careful consideration, attempting to use both causes problems, less common now to see 32bit Outlook but it can be the root of preview conflicts.

SumatraPDF installer by default does not show the extra system hooking/ integrating options that need to both be extracted and registered.

Press the options button in the bottom left thats why it is there

Check the option to Let Windows show previews and importantly consider if this impacts other users, IF there will be other users then install into common \Program Files\ i.e. NOT the application default of a personal area.

1 Like

Is there some way to enable this in a portable install?

Yes any previewers can be installed seperately, and there are several for Explorer or Outlook but so as to work as a server they require locking it into the registry, why not simply install along with any other benefits.

I like not to have my programs be locked onto one place in my drive, which is what happens if I install them. If I ever want to move them I’d have to uninstall and reinstall to avoid problems, which is annoying.
How do I install them separately (from SumatraPDF)?

Several of Windows / Microsoft own previewers include PDF some with extra features such as zoom. Installing previewers normally requires elevated privilege, and you still need to uninstal the previewer when done with it. You can’t simply pull the directory or drive.

All of the above is why you install to a fixed system directory with full user privileges.

If you need to uninstall a previous loaded dll the command (via register as server) is

regsvr32 /U “path to dll”

to install simply don’t use the /U

but do research, why you are advised not to use it ad hoc, unless you have to.

1 Like

I was planning on just using the previewer SumatraPDF offers, but if Microsoft offers a better one, I should use that.

What is it called? The only one that shows up when I google “pdf previewer” is the Acrobat one. I would rather keep using SumatraPDF as my PDF reader - I just want the previewer.

Microsoft one is an optional old version with dependancies on older .net frameworks so for your use not recommended. But if its active to avoid conflict you may need to “uninstall it” :slight_smile:

SumatraPDF one is fairly light and reasonably dependable, but is only “fit page” and vertical scrollbar. Some users complain at the lack of any other feature.

The most popular alternative is probably the one from Foxit, but I dont know its features. I does look like the older 3rd party Foxit one also used .net frameworks so it may have been based on the Microsoft methods.

Ok, where can I get the SumatraPDF PDF previewer for File Explorer, so that I can use “register as server” to install it?

Is it not obvious :cry: its in the installer :rofl:
Be very very cautious to use the /d option in addition to the /x

1 Like

Ah, so I can’t install the previewer separate from the program, given that it’s bundled alongside it in an installer. Ok, thanks.

the /x option allows to extract without install ( use /h on a cmd line) but dont change the installer name and if you dont want the extracted files to disapear to an odd part of the system then use /d for a folder
Also decide if its really just 32 or 64 bit you need (both MAY work on occasion but is unsupported)

1 Like

I registered the PDFPreview.dll and restarted my computer but I don’t see any previews in the Preview Panel when I click on a PDF file.

Ok this is where it gets more interesting,
The previewer is expecting to use its own default PDF handler, (one reason to install them together from the same stable).
Naturally I have SumatraPDF.exe in Program Files for x64 by default.
I am uncertain which is the trigger, placement of the .exe along with the .dll or more likely the default association of all .pdf files with that .exe as the handler.
So the question is do you NEED to use a .reg un.reg entry for the pdf handler ? that would take some time for me to unload all traces, but for you it is a nogo / go situation, you just need to pair loading and unloading that .exe file location.

It can get messy crossing reg entries from one setup to another, as there is the potential to bork a good working setup.

I would be tempted to find a clean machine ( which i dont have at present) and do a dummy install just to check a working preview with registry locations. then export those settings to a .reg file (also deleting the entries carefully)
restart and reintroduce each .reg until there is a sign of a preview

Do I need to use a registry file to register an entry in the registry? I don’t know. You tell me.

I have never, ever had PDF files be previewed on my system, so I also don’t know what you’re talking about when you say I need a clean machine to get the registry locations of the working preview. The only preview I had that worked was from PDF ShellTools which I - got because I didn’t have any - and uninstalled because the trial ended.

Well If you are not using a current previewer on that machine it helps.

Currently I have removed my half dozen (bad on my part to have several) working SumatraPDF ones and testing with another (really poor and slow one) so I can try to add back the registry entries I deleted and see how that helps

How are PDF files opened on your PC ? what happens if you doubleclick a pdf and if it opens why? do they open in Edge as the default PDF handler ?

SumatraPDF is the default application for PDF files.

Sorry its taking a while to test all the basics. So most portable apps that need to temporarily add to and remove items from the registry (without using a conventional installer) provide a pair of load/unload .reg files, a technique I often use.

However for SumatraPDF previewing I found the files growing to exactly the same number (over 100 entries) as if just using part of the installer, which is the only way to make ANY previewer work, not just SumatraPDF.

So in summary if a portable user wants just the preview facilities temporarily and not the iFilter they can run the installer via an elevated command line.

“X:\pre-release\SumatraPDF-prerel-12844-64-install.exe” -s -with-preview -d “%temp%\SumatraPDF”

It will not harm the install to re-use the Tmp Folder, but could make it difficult for other users if not correctly uninstalled, once your done for the day.
To uninstall you must also be in an admin command mode

“%temp%\SumatraPDF.exe” -uninstall -s & rd /Q /S “%localappdata%\sumatrapdf”

Both folders should self destruct i.e. its just as stealth as by any other means.
and ensuring it is uninstalled avoids any problems with CCleaners removing the working copy.

This method is totally unsupported and it would be safer and easier to use the \Program Files\ directory and simply not uninstall until you need to move the C:drive!

Quite simply, no. One cannot register an entry for the previewer DLL in the registry and then have it continue to work even if the DLL is moved. You’d need to de-register and re-register in any case. True portability implies zero integration with the OS, which means no thumbnailer, no previewer, no iFilter, no file type associations etc., since all rely on the OS knowing the exact path to the files involved.

@SumatraPeter I wasn’t clear. It’s not as if I use different machines a lot.

I asked because I already had Sumatra Portable on my pc and would rather not have to install it - since doing so could cause issues whenever I changed my OS or something - so I just needed the previewer.
I always prefer Portable Software for precaution’s sake.
I’m fine with reinstalling the previewer itself every time I were to use it, just not the program.

@GitHubRulesOK Earlier today I had noticed that my Everything by Voidtools had PDF previews, when File Explorer did not.
It’s because the file I had selected in Explorer was in fact an EPUB file.
I mistook it for a PDF file because my default program to open EPUB is also Sumatra, so it had its respective icon. And yes, it turns out regserv32 did its job just fine.
Human error at its finest. Thanks for the help.

On the other hand, it seems that Sumatra does support previews for epub files. I’m gonna try to do something about that as per this comment.

You’ve associated Sumatra with various file types, including PDF and EPUB. Now you’ve registered the previewer DLL as well. I like proper portable apps too, but frankly IMO you’ve pretty much ended up with the same as the installed version. Anyway, your PC so your choice! :slight_smile:

1 Like