Best .md Preview

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 701
Joined: 15 Feb 2016 21:08

Best .md Preview

Post by MBaas »

Has anyone been able to set up a fast and efficient (pre)viewer for .md files?

I wanted to exploit PowerToys' explorer add-ons which Gemini suggested was possible by adding "md>{D8034CFA-F34B-41FE-AD45-62FCBB52A6DA}" but that did not do the trick (empty window). Who's got a better approach?
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

FoxWMulder
Posts: 30
Joined: 29 Sep 2023 03:33

Re: Best .md Preview

Post by FoxWMulder »

You may use SumatraPDF 3.7

1. Overview

There are two ways to enable PDF previews in XYplorer using SumatraPDF:

Option 1 — Standard installation (recommended)

Install the regular, non-portable version of SumatraPDF. The installer automatically registers the Preview Handler in Windows.

Option 2 — Portable version (manual registration)

If you prefer using the portable version of SumatraPDF, you can manually register its Preview Handler in Windows by following the instructions below.

This allows you to keep using SumatraPDF as a portable application without performing a conventional installation.

2. Required Components

For the portable version, you will need:

- A portable copy of SumatraPDF.
- The **SumatraPDF 3.7 installer**, matching the architecture (32-bit or 64-bit) of your XYplorer installation.
- The following files:
- `PdfPreview.dll`
- `libsumatrapdf.dll`

Important: The Preview Handler architecture must match the architecture of XYplorer.

3. Downloading and Extracting the Required Files

Download the **SumatraPDF 3.7 installer** from the official website:

https://www.sumatrapdfreader.org/downlo ... pdf-viewer

You do not need to install the application. Instead, extract the installer contents using the following command:

Code: Select all

SumatraPDF-3.7-64-install.exe -x -d "D:\Programs\SumatraPDF"
Adjust the filename and destination path if necessary.

After extraction, make sure the following files are present in the destination folder:

- `SumatraPDF.exe`
- `PdfPreview.dll`
- `libsumatrapdf.dll`

4. Registering the Preview Handler

Create a BAT file named `RegisterSumatraPreview.bat`:

Code: Select all

@echo off
set "DIR=D:\Programs\SumatraPDF"
set "CLSID={3D3B1846-CC43-42AE-BFF9-D914083C2BA3}"

if not exist "%DIR%\PdfPreview.dll" (
    echo PdfPreview.dll not found!
    pause
    exit /b 1
)

regsvr32 /s "%DIR%\PdfPreview.dll"

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\PreviewHandlers" ^
 /v "%CLSID%" /t REG_SZ /d "SumatraPDF Preview Handler" /f

echo Done.
pause
Change `D:\Programs\SumatraPDF` to the actual location of your SumatraPDF folder.

Run the BAT file as Administrator.

5. Configuring XYplorer

1. Open XYplorer Configuration.
2. Navigate to **Preview → Previewed Formats**.
3. Select **User-Defined Preview Handlers**.
4. Add the following handler for PDF files:

Code: Select all

md>{3D3B1846-CC43-42AE-BFF9-D914083C2BA3}
5. Apply the changes.

6. Important Notes

- Windows stores the absolute path to the DLL. If you move the SumatraPDF folder, you will need to register the Preview Handler again.
- Make sure the DLL files come from the same SumatraPDF 3.7 distribution.
- When updating SumatraPDF, it is recommended to repeat the registration process.

7. Unregistering the Preview Handler

To unregister the COM component, run:

Code: Select all

regsvr32 /u "D:\Programs\SumatraPDF\PdfPreview.dll"
To remove the Preview Handler entry from the Windows registry, run:

Code: Select all

reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\PreviewHandlers" ^
 /v "{3D3B1846-CC43-42AE-BFF9-D914083C2BA3}" /f
---

**Result:** SumatraPDF can now be used as a PDF Preview Handler in XYplorer, either through its standard installation or through manual registration of the portable version.

Unfortunately, in preview it does not allow selecting text. So I consider this a workable option, but not the best.
To see the attached files, you need to log into the forum.

Online
Horst
Posts: 1419
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Best .md Preview

Post by Horst »

FoxWMulder wrote: ↑06 Nov 2026 00:40 You may use SumatraPDF 3.7
No, that's completely wrong.
SumatraPDF does not preview markdown files in any way.
Windows 11 Home, Version 26H2 (OS Build 26300.9974)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1424b (x64), Everything Toolbar 3.5, Listary Pro 7.1.0.47 beta

FoxWMulder
Posts: 30
Joined: 29 Sep 2023 03:33

Re: Best .md Preview

Post by FoxWMulder »

Horst wrote: ↑06 Nov 2026 12:13 No, that's completely wrong.
SumatraPDF does not preview markdown files in any way.
Before writing, I tried it myself. I even attached a screenshot.

yuyu
Posts: 171
Joined: 19 Jun 2018 12:40
Location: Win 7 x64 - 100%

Re: Best .md Preview

Post by yuyu »

I associated .md files with notepad3. No extra configuratiion was needed.

Native2904
Posts: 164
Joined: 23 Apr 2025 18:48
Location: Aachen

Re: Best .md Preview

Post by Native2904 »

Lts. 64-bit XY-Port. ƒ JetBrainsMono @ Windows 11 Pro 24H2 ▣ 1920x1080 ⇵ 115%
xytags4tc

Online
Horst
Posts: 1419
Joined: 24 Jan 2021 12:27
Location: Germany

Re: Best .md Preview

Post by Horst »

Power Toys File Manager Extensions has a good .md previewer.
This works in Explorere, and all file managers.

XY Preview has to be configured.
- Disable .md in the Text Files list.
+ Enable .md in the Document Files list
Windows 11 Home, Version 26H2 (OS Build 26300.9974)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1424b (x64), Everything Toolbar 3.5, Listary Pro 7.1.0.47 beta

MBaas
Posts: 701
Joined: 15 Feb 2016 21:08

Re: Best .md Preview

Post by MBaas »

Thank for all the input! Actually FoxWMulder's suggestion magically enabled the pdf previewer to preview md, too!
I also got the ShellExt for convenience. Couldn't get the Powertoys-handler to preview (which would have been the preferred solution) and gave up, as there were alternatives...
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

Post Reply