I had this project in my personal queue for quite some time. Fortunately, I finally found some time to start coding.

So here it is:

A fully integrated Sumatra PDF based Lister plug-in.

This is the initial release so there are probably some rough edges, though I tested it quite extensively.

Now to what is more important - the features:
- View PDFs with Lister (or any other tool supporting wlx plug-ins)
- Fully independent of any external tools or additional libraries
- Very simple non-obtrusive interface, stripped down to the bare minimum
- Tightly integrated into Total Commander, thus offering support for search (your favorite F3->F3 combo works!) and position
- Fast, because it uses the Sumatra PDF code-base (that in turn uses MuPDF to render)
- Small, only 1.7 MB (compressed with UPX) for a full fledged PDF viewer
- Free Software (GPLv3 as required by Sumatra PDF)

Known issues (will be fixed when I find some more time):
- Original toolbar implementation of Sumatra PDF is a hack, thus there are some minor render glitches (in the toolbar you'll see an extra separator) when using the "Classic Theme"
- Slow rendering tasks may need to be completed before window will be closed

TODO/Wishlist (will be added when I find some more time):
- Add advanced (XMP based) properties dialog for the shown PDF
- Implement printing support
- Find a nice way to show/hide TOC box (ini setting?) and make it search-able

For now, I did not put the sources into a proper repository, but you can get them here.
The changes were made against r2072 so just check out this version (or try it with HEAD) and extract the archive to the source tree.

Hi J, I'm the author of Sumatra. If there are improvements that you're making as part of your plugin work that would also benefit Sumatra, I encourage you to send them to me, as described at Sumatra website (section develop)

I believe it would be good for both of us: Sumatra would get the benefit of additional improvements and you would have a smaller diff to maintain for your project. In general I'm happy to give svn commit privileges after a few patches, to make it easy for people to contribute.

Maybe it would even be possible to build your plugin directly from Sumatra's sources (with a few #ifdefs).

I believe it would be good for both of us: Sumatra would get the benefit of additional improvements and you would have a smaller diff to maintain for your project. In general I'm happy to give svn commit privileges after a few patches, to make it easy for people to contribute.

Sure thing. For now the changes mainly regard the integration part. But when it comes to the toolbar I will definitely prepare patches for the main source tree when I make improvements.

kjk wrote:

Maybe it would even be possible to build your plugin directly from Sumatra's sources (with a few #ifdefs).

I first went this way but the source became a bit too convoluted. I suppose in the long term it might be better to basically have a main.cpp and a listplug.cpp and put the specialized parts in either and the common parts in the SumatraPDF.cpp (those where little to none #ifdefs are needed). Anyway, if the plug-in would be a welcome addition to the main project I suppose that I will try to find some time to do a bit of integration work so the changes do not diverge that much and the plug-in keeps an up-to-date code-basis.

I also suggest to base on original source code. You will be able to do print, search etc, and no glitches when rendering.
Pls, Upx compr. - make an option(if I include it into UV package, non-compr. version will be better)_________________Universal Viewer - Log Viewer - SynWrite

There should be at least an option to set the default Zoom factor.
Currently it comes up everytime with some unreadable small display and doesn't remenber the last used Zoom.
This way you can't read a lot of PDF files in a short time.

I also suggest to base on original source code. You will be able to do print, search etc, and no glitches when rendering.
Pls, Upx compr. - make an option(if I include it into UV package, non-compr. version will be better)

It is based on the original source code, hence the Sumatra PDF origin and not MuPDF (or so). But to implement an integration, printing and search needs to be delegated and the Sumatra PDF based search was not portable in that sense.
Also printing needs to be redirected as Total Commander tells the method what printer to use etc. (basically not that hard to do).

The glitch is inherent in the Sumatra PDF toolbar as it uses a separator as a spacer and thus it will produce some glitches. When I will find some time I will implement a proper toolbar that can be used in Sumatra PDF and my derived WLX.

Finally, I tested various compression variants and UPX produces the smallest overall archive. On important point is, that I want to use a standard format such as RAR or ZIP, any other would mean that the user needs an extra packer (plug-in) installed. Feel free to use UPX to decompress the DLL if you have a problem with it or compile the source code to get a real vanilla file.

There should be at least an option to set the default Zoom factor.
Currently it comes up everytime with some unreadable small display and doesn't remenber the last used Zoom.
This way you can't read a lot of PDF files in a short time.

You are right. I forgot to mention that in my "Known Issues" list. There is no proper configuration yet. When it will be used, the zoom will definitely be saved.

2j
I must say you fulfilled my dream (shared with Ultima Prime long ago). Thank you.

So... next dreams are:
- some comic viewer as WLX,
- ToDoList by AbstractSpoon as WFX _________________"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

I released an update. The new version will store the last set zoom level.
You can disable writing of a new zoom level by setting savezoom=0 in the lsplugin.ini under the [SumatraPDF] key. Then the value stored as zoom will be used when opening a PDF (where -1 is fit page and -2 fit to width).

There is some heuristic going on when "fit image to window" is active:
When a previous session (like Imagine or what ever) sets the "Fit image to window" it will overrule the previous zoom level but will not overwrite the setting in the INI. Thus when pressing "f" you will return to the previous zoom-level. I think this way the behavior is quite consistent.