As you probably read on the Dot yesterday Okular doesn’t support much of ODF. I remembered that Jos had created the Slidecompare tool, so I got the idea to combine it with an Okular generator. It turned out that it’s pretty easy to combine the ends from both worlds. Okular offers a very nice API to write generators, which is almost an exact match to the KOffice one.
The generator currently supports only formats supported by KPresenter: ODP, PPT and PPTX. Currently only rendering is supported (so no search).
The generator is now in KOffice trunk. Even though it’s just 107 lines of code, it can make use of all the work that went into the KOffice import filters. I love integration!

July 20, 2010 at 11:44 pm
Otp is the OpenDocument Presentation Template type; that is supported by KPresenter. I also know that at least pps (PowerPoint Slideshow) is supported as well by ppt filter. Perhaps you could add that to the filetypes supported? And there is presumably also some ppsx or similar for the msooxml filters.
July 21, 2010 at 3:31 pm
Yesyesyes! This is so cool – I dont have to start a full-blown office suite anymore to simply read some document! Would be veeeery cool if you did this with ODTs and ODSs, too
July 21, 2010 at 3:59 pm
ODS isn’t really suited for this as the sheet isn’t page based. Of course ODT would be cool to. I’m not sure how to do that yet though.
July 21, 2010 at 4:10 pm
That what I call fantastic!
July 21, 2010 at 4:54 pm
Would it be possible to just have one really long page, or to break it up into pages based on sort of rules? For instance you could use one of the font sizes set system-wide by KDE to set the width and then use the aspect ratio of the preferred page size to set the height. I think turning okular into as generic a document viewer for all your document needs would be a huge boost.
July 21, 2010 at 5:01 pm
Great news! But I hope .odt will be also be supported sometimes.
THX!
July 21, 2010 at 8:34 pm
Impressive!
July 21, 2010 at 8:52 pm
Nice, only 107 lines is pretty small code! I hope packagers pick this up.
July 21, 2010 at 9:26 pm
This is really good news. I hope to view presentations in Okular in a near future.
July 22, 2010 at 12:22 am
That’s really great! Good job!
Are you familiar with the internals of the text based KOffice libraries? There is a QTextDocument based generator in Okular which just takes a QTextDocument and does all the rest automatically. So if you know whether it is possible to get a QTextDocument for a ODT, then implementing proper ODT support in Okular should be quite easy as well.
Ciao,
Tobias
July 22, 2010 at 12:44 am
It’s a bit more complicated than that. Of course I want all of the document and not just the text. QTextDocument is used internally to store the text, but the rendering is done but KOffice code. I’m trying to come up with something, but it’s more complicated than the presentation case.
July 22, 2010 at 12:44 am
Wow! great feature. I think ODF support will make viewing documents and presentations more easy.
Thanks!
July 23, 2010 at 3:34 am
Amazing!