Thomas Fischer's Weblog

Life, Linux, LaTeX

Archive for May 2010

KParts Browser Plugin

with 21 comments

One of the biggest advantages of Konqueror is that it smoothly integrates with the KDE desktop. Any file type can be opened within Konqueror as it loads KParts modules to handle non-HTML files. For example, to display PDF files within the browser, the embeddable part from Okular is used. Unfortunately, this technology is KDE-only, at least no other browser supports KParts.

On the other side, most browsers support a plugin technology originally coming from the good ol’ Netscape 2.0. Most prominently, it is used for the Flash plugin from Adobe and the PDF plugin as part of the of Acrobat Reader.

So, why not combine both technologies to use KDE parts in “normal” browsers?
With quite little effort, based on some examples by Qt/Nokia, I was able to hack a proof of concept: A small plugin which can be used with browsers such as Mozilla Firefox, Opera, Arora, or Chromium.

So far, the plugin supports PDF and PostScript files (via Okular), OpenDocument text, presentation, and spreadsheet (via KOffice) and MP3/OggVorbis files (via DragonPlayer). More file types can be added with only a few lines of code, given that there is a KDE part installed which can handle this file.

Interested? Visit the project’s homepage and try it out yourself!





Advertisements

Written by Thomas Fischer

May 22, 2010 at 17:09

Posted in KDE, Linux