Hey everyone<br><br>( Please remember to cc me or the nepomuk mailing list )<br><br>As you might remember, we foolishly tried to use Okular to fetch the text and document metadata for 4.10. Okular, clearly isn't ready to be used in such a way cause its UI parts are quite integrated with the rest. Would it be feasible to change that?<br>
<br>In Nepomuk when we were trying to create the Okular::Document, we passed a null pointer for the widget.<br><br>This posed the following problems -<br>1.) Document class -<br> a.) It tries to override the cursor via QApplication - we don't have a QApplication<br>
b.) It tries to create a QPrinter in order to determine the paper size<br><br>One very simple way to fix both of these is to not call them when you don't have a widget. I've attached a very simplistic patch which does that.<br>
<br>2.) Generators - All the generators use the main widget and often create dialogs. How do we counter this? Again, the only mechanism that I could think of was for Okular to tell the generators not to create any ui elements, and we modify all the generators to abide by that.<br>
<br>In the case of the PDF generator, the only UI components that I noticed was the password dialog. The DVI generator has this whole DVIRenderer which I'm not too sure of.<br><br>Anyway, it seems like it can be done with some effort.<br>
<br>Is this direction acceptable to the Okular team? Or should I just ignore all of this and write nepomuk indexers using the libraries used in the generators? Doing that would lead to quite a lot of code duplication, but it might be considerably faster since we only need the plain text and document metadata.<br>
<br clear="all"><br>-- <br><span style="color:rgb(192,192,192)">Vishesh Handa</span><br>