Lister Viewer Pane


Decided to try to crack a problem that's been a pain for a while now.

Symptoms are:

  1. trying to rename a pdf gets the dopus response "an error occurred renaming ... process cannot access the file because the file is being used by another process (32)"

  2. trying to delete or move the file gets a similar message.

  3. double click on pdf file gives a notepad struggling to do something with all those non-displayable characters, so then notepad has to be killed

I have rebooted, started from scratch and the same thing occurs. Not every time though.

Had a spell this morning on trying to get to the bottom of this. Now, I have the lister viewer pane showing, directly above the metadata pane, and to their left two listers. No tree display.

I have previously configured viewer plugins to have ticks only against these types:

animated gif
jpeg 2000

I like the viewer pane to be permanently displayed so that when I'm browsing the music collection I can see any album art, etc and for stuff like exe or rar or whatever, I get an icon displayed.

So far so good, except that pdf seems to handled differently. If I click on a pdf in the lister it can take anything from an instant to several minutes to never for the viewer pane to attempt to display the alphanumeric dump of the pdf, with all of its non-displayable characters, potential large size, etc:

43 0 obj
<</Linearized 1/L 14309855/O 45/E 12888409/N 2/T 14308880/H [ 3236 573]>>

43 147
0000000016 00000 n
0000003809 00000 n
0000003981 00000 n
0000004899 00000 n
0000005502 00000 n
0000006031 00000 n
0000006707 00000 n
0000007337 00000 n
0000007444 00000 n
0000008041 00000 n
0000008545 00000 n

This I think explains why I've had trouble moving, deleting and renaming pdf - because dopus has got them. Not sure why pdf gets loaded as notepad but something is going on under the covers.

I can obviously click the icon to turn the viewer pane on and off, but forgive the pun, that would be a pain.

The viewer pane seems to handle other file types well like exe, rar, etc and they're not configured in the viewer plugins.

Why is pdf handled differently? I'd like pdf to be handled like exe and rar - just display an icon.

Any clues, explanations, clips round the head, etc gratefully received.

PDFs start with what looks like text data, so if nothing else handles them, the text viewer will have a go, and Notepad (or your default text viewer) will be used.

Installing a PDF viewer is one way to fix it.

I was just being mystified by the way dopus would display a pdf icon for some files and do a text dump for others, and you've just explained how that happens before I asked the question.

And there was me thinking it was all based on the extension being pdf...

Looking at options to get round this situation of too much intelligence then:

  1. Could I use my pdf software sumatrapdf as a viewer
  2. Is there a keyboard shortcut to turn the viewer on and off?
  3. I could not find pdf in the settings-file types list -- could I set it up and do something there?
  4. Could I configure the text viewer to not try to process a 60MB file?
  5. Could I request a change to dopus or the text file viewer or something else to allow me to configure this behaviour to not do what it currently does?
  1. Unless it has changed since I last looked, Sumatra does not include any viewer component which can be used within Explorer or Opus.
  2. F8 by default.
  3. A PDF file type could change what double-click does, but not what the viewer does.
  4. You can set a max size for the text plugin under Preferences / Viewer / Viewer Plugins.
  5. Posting problems here is enough to request things, so you don't need to do anything extra.

I've configured the text viewer to limit it to 10KB and that seems to work. I can now select any pdf in the lister and I just get the pdf icon. I also turned off the hex mode option while I was there, but no idea if that's relevant.

So that is just about it, except I'll be able to see if I get any further funnies with double clicks on pdf bringing up notepad. I'm thinking that's just what happens when the viewer is bogged down with a particularly exhausting large pdf. I have a mental image of an anaconda trying to swallow a london bus.

I had a quick look to see if I could compare the size of dopus to the code used on the apollo moon landing, but I'll have to get back to you on this.

Thanks, I'm as pleased as a ginger biscuit that's just been dunked in a large mug of hot tea.

p.s. I think f8 is the folder tree, and f7 is the lister.

The double-click issue can probably be fixed (assuming it's Opus doing it, rather than Windows being configured to open Notepad for PDFs) by turning off Preferences / File Operations / Double-click on Files / Open unregistered file types in text viewer if they appear to be plain text.

Thanks for that tip - I have turned off the suggested preference. Presumably if the text viewer limit is set to 10KB on my system this also applies to this preference... Open unregistered file types in text viewer if they appear to be plain text (assuming size is less than limit, if set)

I checked file associations in windows and pdf is associated with sumatrapdf.

I opened 10 pdfs as a test, and they all opened normally with sumatrapdf and all showed a pdf icon in the viewer. Will monitor this over the next few days.

Just starting to understand what file types are about, but as I mentioned above there is no entry for pdf in file types, so presumably that makes pdf unregistered. I can't remember making pdf unregistered, so does dopus come with pdf registered as default, or does it make sense to manually register it, and other types I encounter that are unregistered?

The text viewer limit doesn't affect what happens on double-click; if that option is turned on, and you double-click a file that looks like plain text and isn't a properly registered file type, Opus will treat it as a text file and invoke Notepad.

Windows has about 68526 different ways to register filetypes, it sounds like the way Sumatra has registered itself isn't being recognised by Opus (and so Opus is treating it as unregistered).

Yes, just looking through the file types, I can see lots that must come from what happens when a file type is registered with windows. I put some text that I could recognise in the tooltip for unregistered file type, and sure enough, I see the tooltip when I hover over a pdf. Incidentally, not sure where dopus gets it from, but the small icon to the left of the pdf is a pdf icon, presumably from sumatrapdf. Also if I right click on a pdf and select properties it confirms "Open with SumatraPDF".

Presumably dopus does a regular trawl through windows own registered file types and updates its own list?

When I double click a pdf then does dopus pass it over to windows to handle, and then windows knows to open it with sumatrapdf?

Things are working pretty well now, despite pdf being unregistered, but would it be straightforward to register pdf within dopus if I look at another registered file type for inspiration?

Or, given that the problem I wanted to solve at the outset is looking pretty well solved, would there be any advantage to doing that?

Windows file types are a bit of a dark art, if it's working how you want it now I would leave well enough alone :slight_smile: