Integrated Sumatra PDF based Lister plug-in (wlx)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
ehab
Senior Member
Senior Member
Posts: 271
Joined: 2007-10-29, 07:41 UTC
Location: Libya

Post by *ehab »

A simple way to crash this plugin and then it will crash TC also is as follows:

Code: Select all

1- create a file add some html e.g: <hrml><body>hello</body></html>
2- save with extension crashme.html
3- in TC and quick view, this will cause the crash.
hope j can find the time and trap such an error.
#181344 Personal licence
wjharing
Junior Member
Junior Member
Posts: 24
Joined: 2007-04-22, 18:44 UTC

Post by *wjharing »

official Sumatra PDF is now upgraded to 1.2. may some issues will be resolved when this plugin is updated with the latest Sumatra code.
iana
Senior Member
Senior Member
Posts: 345
Joined: 2010-07-27, 22:00 UTC

Post by *iana »

Sumatra PDF is up to version 1.4 is it possible to update the plug-in?
Tanks
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I want to make donation(not big) to those who add needed function. "Print" command/btn.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

It impossible to add printin to SPDF r2072. Print is bad there. Need to use later revision-and to rewrite wlx
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

[mod][OT] posts split to sLister WLX plugin.

Hacker (Moderator)[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
patalla
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-09, 12:57 UTC

Post by *patalla »

Hello, I was trying to install and use this plugin, yet when using Ctrl+Q" to preview PDF files, my TC 8.01 turned out to be crashed.

I can't figure out why it happened since I reinstalled my Win8x64(Win7x64 as well) system a few days ago(I'm using TC portable mode).
Do I need something installed or Sth required?

Thank you for any advice!
User avatar
EricB
Senior Member
Senior Member
Posts: 355
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Hi Patalla,

I just checked and for me it is working without problems. I'm using TC 8.01 (x32) portable on Win7SP1 x64. I also have SumatraPDF made portable, but I use the latest release build and no development builds. Did you check if the correct path is set in slister.ini? Maybe this path is not allowed (elevation needed). Or else the problem is Win8?

Regards, EricB
patalla
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-09, 12:57 UTC

Post by *patalla »

EricB wrote:Hi Patalla,

I just checked and for me it is working without problems. I'm using TC 8.01 (x32) portable on Win7SP1 x64. I also have SumatraPDF made portable, but I use the latest release build and no development builds. Did you check if the correct path is set in slister.ini? Maybe this path is not allowed (elevation needed). Or else the problem is Win8?

Regards, EricB
Hi EricB,

Sorry that I didn't mentioned that I'm also using TC8.01, x64 version(In x32 I use SumatraPDF instead).

my install method is download the .zip file and locate it in TC, then TC shows messages that whether I install this plugin or not.

The defult-install .ini detail is:


[slister]
;path=%COMMANDER_PATH%\utils\sumatrapdf\SumatraPDF.exe

But sLister plugin was installed by defult directory is:

%COMMANDER_PATH%\Plugins\slister\

Then I tried to correct .ini to match the real directory, but it didn't work.

When viewing PDF with sLister, WinOS bumped up a message which said, "SmatraPDF.exe has stopped working".

Just a couple days ago, I could use slister working ok(also Win8 OS), yet this time I reinstall
OS then sLister can't work.

I also tried to create a directory"\utils\sumatrapdf" and put sumatraPDF.exe into the directory just like the .ini contained.

Maybe there's Sth I did wrong?
User avatar
EricB
Senior Member
Senior Member
Posts: 355
Joined: 2008-03-25, 22:21 UTC
Location: The Netherlands

Post by *EricB »

Hi Patalla,

It all depends on the setup. You mention that you use TC 8.01 x64, so I assume you also use the x64 version of slister plugin, which can be recognized by the wlx64 extension. I noticed that the latest archive (version 1.1.2) contains an outdated SumatraPDF.exe. Be sure to remove that old version. The slister.ini gives you the option to point to a folder where your latest SumatraPDF is residing. The folder must be valid and this part is crucial: the ';' in front of the path needs to be removed! It is used to comment out the path... If that is the case, effectively a NULL pointer is cast, rendering an error.

HTH,

Regards, EricB
patalla
Junior Member
Junior Member
Posts: 3
Joined: 2012-06-09, 12:57 UTC

Post by *patalla »

Hi EricB,

I have to say your mention saves me!

your assume was right, I should have menion more detailed.

I deleted the";" in the .ini file, then it works OK.

And I also repalce 1.1.2 to the latest version of SumatraPDF.

So appreciated for helping me solve the problem, that's very helpful and I learned the basic of basic tips of .ini-scripting.Thanks again! :wink:
iana
Senior Member
Senior Member
Posts: 345
Joined: 2010-07-27, 22:00 UTC

Post by *iana »

Use zeniko's (one of the sumatra devs) portable prerelease of sumatrapdf as it supports more features and has a lot of bugfixes for a list of changes see https://code.google.com/p/sumatrapdf/source/list
a link to the latest prerelease (aka svn build)
http://software.zeniko.ch/sumatrapdf/SumatraPDF-dev.exe

On how to add more formats to slister read this thread
http://ghisler.ch/board/viewtopic.php?t=31313&postdays=0&postorder=asc&start=60

the latest build from zeniko supports not only pdf and djvu/chm/cbz/cbr but epub/mobi/prc/pdb/fb2 etc.
note the mobile formats aren't supported with kristof's builds as they use a different UI that can't be embedded in lister.
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Recompiled for x64 - SumatraPDF.wlx64

Post by *milo1012 »

Topic back to the original SumatraPDF.wlx Plugin:

Since I'm trying to migrate all my plugins to 64bit I was bothered that there's just the x32 version of it.
So I did a quick recompile for x64 and integrated the original SumatraPDF source (r2072):

Download here
(I also did a recompile for the x32 version, probably no real differences,
but I had the newest updates installed for MSVC 2008, so maybe some security fixes,
also it's not compressed with UPX or similar, contrary to the original binary, so do it yourself if you like.)


So why still bothering with that plugin?
I also use slister for viewing PDFs now, but for Thumbnail preview the SumatraPDF.wlx plugin works well
and we can use it portable w/o relying on the system's installed PDF viewer for Thumbnails in TC.
I know, it's three and a half years now, but the SumatraPDF source changed a lot and so it's quite a task to patch the plugin for it.

I included some quick (and maybe also dirty) patches to make it compile for x64.
Seems to work well, I tested some big an nasty PDFs as well as some standard types.
But I guess there could be some trouble.
So, if you experience a crash, check if the 32bit version also does, so we'll know that it's the x64 compile.

I hope that with the source someone is finally willing to port the plugin to a newer SumatraPDF source and add the print function.
I probably don't have the time nor do I have the GUI-programming skills for this (I guess...)

BTW, does someone know what happened to j?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I've noticed GWL_WNDPROC to GWLP_WNDPROC replacement in dialogsizer_set.cpp. However you must also replace SetWindowLong with SetWindowLongPtr because first one only accepts 32-bit numbers.
Also LONG_PTR must be used instead of LONG for 64-bit compatibility, especially with casts (LONG corrupts pointers because it is always 32-bit in contrast to LONG_PTR which is 64-bit in 64-bit mode).
User avatar
milo1012
Power Member
Power Member
Posts: 1158
Joined: 2012-02-02, 19:23 UTC

Post by *milo1012 »

MVV wrote:you must also replace SetWindowLong with SetWindowLongPtr ...
As I said, Q&D patches that made it possible to compile x64 w/o major changes.
I wasn't sure if switching to SetWindowLongPtr would cause more trouble than it fixes.
It tested well, but just like I said: that there might be problems.

If you're willing to patch it to your better liking, go for it!
Otherwise I'll see if I can do some overhaul with better x64 fixes from the newer source files, but for that I need some time.
I also want to wait if someone experiences some crashes first.
Post Reply