Thread: iLiad DJVU viewer?
View Single Post
Old 11-10-2007, 04:41 PM   #4
HET2
Junior Member
HET2 began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Nov 2007
Device: iLiad
Speaking of the djvu viewer. I took scotty's djvu viewer and tried to make it more useable. After playing with it for a few days I have come to a very unfortunate conclusion.

The javadjvu library is too much of a mess to ever work on the iliad.

The problem is that the code is very very dirty. I stumbled upon some code which only works on pc's because java recognizes an infinite loop and throws an exception. On the iliad this crashes the virtual machine .

The good news is that I have refactored scotty's code quite a bit, not to say I have totally rewritten it. The result is a framework which can be used to rapidly create a java based viewer using a different library. You can find the complete source code here: http://diman.todorov.googlepages.com/javadjvu.jar. The jar contains settings and sources to an eclipse project. If you want to build it, don't forget to set the path to irex.jar to where you have put your irex.jar (which can be found in /home/intent on your irex).

The refactored code gives you the benefit of not having to worry about interfacing to the toolbar, the pagebar and the keys. You just need to implement a zooming function and register it as a callback for the button/icon of your choice.

If you have any questions about implementing a new viewer, feel free to ask - I have (painfully) collected quite a bit of experience...

Just don't forget, the code won't work in its present state - it just demonstrates that the application gets caught up in an infinite validation loop before it crashes (look in /var/tmp/ktrace.log for stdout/stderr output).
HET2 is offline   Reply With Quote