Open Document thumbnails in Dolphin?

Is there a way of getting thumbnails for ODF files in Dolphin?

The TW repo has “kde-odf-thumbnail” (1.0.0-3.5) which installs…

/usr/lib64/kde4/opendocumentthumbnail.so
/usr/share/kde4/services/opendocumentthumbnail.desktop

… I was hoping that it may possibly work (I’m clearly mumbling around in the dark here) by just creating symlinks in…

/usr/lib64/qt5/plugins/
/usr/share/kservices5/

… to those files.

Unfortunately no luck. The thumbnailer appears as an option in (Dolphin’s) “Settings … Previews”, but no preview is generated.

That’s a KDE4 version and only works with dolphin4 or Konqueror (which is still KDE4 based).

Unfortunately no luck. The thumbnailer appears as an option in (Dolphin’s) “Settings … Previews”, but no preview is generated.

Yeah, it likely crashes because it is loaded by KF5 (and uses Qt4).

It should not be hard to port kde-odf-thumbnail to KF5, but so far nobody did it AFAIK.

An option would be to install calligra5 (which also includes a thumbnailer for odt files) from KDE:Unstable:Extra, but that would replace the stable calligra, so probably not a good idea if you rely on calligra.
And I’m not completely sure that it works at all with the stable KDE Frameworks 5.19.0 (but I think it should).

Yes, I knew that but thought (again) I’d give it a try. I wasn’t surprised that it didn’t work…

An option would be to install calligra5 …

Bother…

I don’t really want to install calligra just to get a thumbnailer, and I’d like to keep this TW install as only the base TW repos.

I’ll just have to wait until someone gets around to porting it I guess.

Thanks.

As I said it shouldn’t be hard. The main thing that has to be changed are the cmake files to actually build against KF5/Qt5, not KDE4/Qt4.
I might give it a try this weekend.

Actually I already looked at it shortly a few weeks ago and wanted to do it, but then forgot about it.

The only thing the thumbnailer does is extract the odt “archive” (an odt file is just a ZIP archive) and return the included thumbnail image (Thumbnails/thumbnail.png).

My man! :slight_smile:

I’m sure quite a few people apart from I would appreciate that.

You can find the KF5 port of kde-odf-thumbnail here now:
http://software.opensuse.org/download.html?project=home%3Awolfi323%3Abranches%3AKDE%3AExtra&package=kde-odf-thumbnail

I will submit it to KDE:Extra in the next days, from where it will get to Tumbleweed too.

Btw, in case you’re interested, this is the full patch: :wink:
https://build.opensuse.org/package/view_file/home:wolfi323:branches:KDE:Extra/kde-odf-thumbnail/port-to-kf5.patch?expand=1

Downloaded the RPM and installed…

Thumbnails now present and correct for *.odt, *.odg, and *.ods… super job. Greatly appreciated, many thanks. :slight_smile:

Btw, in case you’re interested, this is the full patch: :wink:
Welcome - openSUSE Build Service

This old dog could be too old to start learning new tricks… or resurrecting old ones. The last time I did any serious coding was mid 80’s using assembler on an 8080, dabbled with c a little, and more recently, python (but only because I had to)…

You’re welcome, and thanks for the confirmation that it works. :slight_smile:
It did here, but it’s always good to get it confirmed…

I have submitted it to KDE:Extra from where it will reach Tumbleweed, and I’ll submit an update for Leap as well.

This old dog could be too old to start learning new tricks… or resurrecting old ones. The last time I did any serious coding was mid 80’s using assembler on an 8080, dabbled with c a little, and more recently, python (but only because I had to)…

Well, there’s not really much “coding magic” in a patch.
In short, it shows you what lines got changed. Lines starting with ‘-’ got removed (marked as red in the OBS web interface or “good” text editors), lines starting with ‘+’ got added (marked as green).

I just wanted to show off that there were no real changes necessary in the code (as I already wrote), only the cmake files (CMakeLists.txt) which are “recipes” for how to build it. :wink:

True perhaps in this case… but it’s the knowing what needs to be changed :wink:

Truth be told, I just don’t have the enthusiasm to code any more.

Of course.

Truth be told, I just don’t have the enthusiasm to code any more.

Well, nobody forces you to do.

Sorry, I wasn’t implying that you (or indeed anyone) was.

No, I understood that, I just replied.

And I didn’t want to imply that you did imply that either… :wink:

Is there any options to be able to see the thumbnail in Leap 15.2? I have installed SoftMaker’s Office Suite and can’t get thumbnails (document preview) of any .docx ducuments.
Help would be greatly appreciated.

Kind Regards

Softmaker’s Office Suite won’t help much in this regard.

Try to install calligra, that does contain thumbnailers for some doc formats. But I’m not sure its thumbnailers supports .docx as well.

Thank you for your reply.
If I am not mistaken, Calligra is a a Office Suite on its own. Do I have to install the whole app for the thumbnailer to work? Any other options?

Kind regards

Yes. Calligra’s thumbnailer uses other parts of the Office Suite to actually render the documents.

The kde-odf-thumbnail that this thread originally was about (an extra package in the past, but part of kio-extras5 meanwhile) is more light-weight because it just uses the preview image that’s already included in a .odt file. But it only supports .odt files, not .docx (I don’t know whether .docx files actually contain such a preview image anyway).

Any other options?

I don’t know any for .docx files.

I remember a generic thumbnailer (“keneric”) that can be extended via scripts:

You’d still need some (command line) tool(s) to actually generate/extract the thumbnails from a .docx file. If they do contain a preview image, I suppose unzip would be all that’s needed though (they are just ZIP archives).
But I can’t even find the source code anymore at the moment (the links in that post are all dead) unfortunately, nor a package.

Good news though: it seems that the “Open Document” thumbnailer in kio-extras5 actually has been extended to support “Office Open XML” (eg. docx, xlsx, pptx) as well meanwhile.
https://invent.kde.org/network/kio-extras/-/commit/c6da4dabf635842f6d364c736937645ee5d690dc
(I somehow missed that apparently… :shame: )

And actually that should be part of kio-extras5 20.04 as shipped in Leap 15.2.

So make sure that kio-extras5 is installed, and that the “Office Documents” previews are enabled in dolphin’s settings (and of course that previews are enabled in the first place).

If it still doesn’t work, I suppose your files don’t contain previews… (or there’s a bug)

Thank you so much for the reply. I will look at this and see if it works.
Appreciated.

OK, so I have the package kio-extras5 version 20.04.2 installed on my Leap 15.2. When I go to dolphin’s Preferences > General > Previews > Office Documents is ticked.
On my Mac machine same files have preview. Then is there a bug?
Last resort, is it that I have to install calligra?

Thank you

I did install calligra, made sure the Dolphin settings had the previews on and rebooted. But there are no previews.
Is this a bug? Is there a conflict somewhere!?

Could use some help if possible.
Thank you in advance.

Kind regards.