Quote:
Originally Posted by scotty1024
So I ask: which djvu viewer is the best to start from?
.
|
The answer is: none.
You only have one compiling decently, djview. But on other hand it comes with a nice packaging including command line utilities, so for the time you have compiled it, you have also got the non-gui tools, particularly
ddjvu
And then you find that djview depends of detecting the move of the mouse before click (no a great task for a wacom tablet, but unimplemented). And than you must rewire the keyboard to use iLiad keyboard. So perhaps it is more sensible to use you java trickies or Antartica tcl/tk (or iLiad tcl-tk?) instead of patching djview heavily.
Moreover, the ddjvu in the tar.gz above is already compiled for an ARM architecture with older dinamic libraries, so I would hope it to work in the iLiad with the more recent ones.
Given a page in $i, I use the following two command lines:
Code:
ddjvu ebook307.djvu -page=$i -size=600x800 -format=pgm -aspect=no | pnmdepth 255 > /tmp/page0.pgm
tail +4 /tmp/page0.pgm > /tmp/page1.raw
It is possible to get segments of a zoomed page:
ddjvu ebook307.djvu -page=$i -format=pgm -size=800x1000 -aspect=no -segment=800x600+0+400 > /tmp/page0a.pgm
It is possible to rotate using pnmtools (also in the package):
pnmdepth 255 /tmp/page0a.pgm | pamflip -transpose| pamflip -topbottom | tail +4 > /tmp/page1a.raw
These "raw" images were still 800x600x8bits, We had a custom utility to reduce them to 2 bits (pgm4biARM), but here in the iLiad it is not needed, the Xserver will take care off, you only need some java tool to show pgm files (so not | tail+4 neither).
There are some other tricks you can see in the bash script "lbdjbrowse". You have
pnmpad, to put white space around a bad cropped page. pnmcrop to cut a preprocessed page, and pnmscalefixed to zoom or fit a page without cropping (fixed is because it uses not float point).
Let me note also xwdtopnm. Not related to djvu, but a nice tool to view screendumps of an Xserver. Also pbmtext is a stupid utility having java running and all that, but if you need to show an ASCII message in a graphical area, it is a nice shortcut to do it from bash.
Regretly I forgot to include pgm2jpg (?) or similar converters
so you will still need them from debian netpbm