Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2010, 03:35 PM   #1
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
DjVu plugin for DR1000 (testers wanted)

This is the first release of a DjVu plugin for the universal document shell, which allows you to open DjVu files from the content browser, using the same interface as the existing pdf, image and text viewers.

- Warning 1: the plugin has only been lightly tested, use at your own risk (see below for what the installer exactly changes)
- Warning 2: the installer removes the mobipocket plugin, because it conflicts with the djvu plugin for some reason

What works (many of these are provided by the UDS):
- last page, zoom settings are remembered
- navigation, zooming
- scribbling
- bookmarks, thumbnails
- prerendering and caching of pages

What doesn't:
- table of contents
- search

Installation instructions:
- Extract the attached zip file to the root of your SD card
- execute 'Home/Documents/Programs/Install/Install DjVu plugin' on the reader
- wait for the device to reboot
- if you have any problems, try to reinstall the firmware (see Removal) and to reset the device to factory settings ( Home/Settings/SD Card Properties, Reset the Settings). Then install the DjVu plugin again.

Removal:
- If you still run the same firmware as when you installed DjVu plugin, execute Home/Documents/Programs/Install/Remove DjVu plugin.
- Or: Reinstall the firmware by downloading http://updates.irexnet.com/embedded/dr1000/latest.zip and extracting it to the root of your SD card. follow the instructions.

The installer adds/modifies the following files:
- three djvu icons for the content browser in /usr/share/ctb
- gconf schemas are overwritten to add the djvu file format:
/etc/gconf/gconf.xml.defaults/%gconf-tree.xml
/etc/gconf/schemas/ctb.schemas
- /usr/lib/libdjvulibre.so.21
- /usr/lib/uds/libuds-plugin-djvu.so
- /usr/lib/uds/libuds-plugin-mobipocket.so is removed
(the original files are backed up in /Programs/_djvuplugin/bak on the SD card)

If you find any problems with this plugin, or have suggestions, please let me know. Testing is at your own risk, I have tested it with firmware 1.7 and 1.7.1 on a DR1000, and with 1.7 and 1.6 on the emulator.
Attached Files
File Type: zip DjVu-Plugin-0.1.2.zip (855.6 KB, 132 views)
File Type: zip DjVu-Plugin-0.1.3.zip (855.9 KB, 136 views)

Last edited by luite; 02-03-2010 at 10:23 AM. Reason: added version 0.1.3
luite is offline   Reply With Quote
Old 02-02-2010, 05:09 PM   #2
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
I have found a small bug in retrieving the dimensions for the page (an off by one error), which caused problems displaying the last page in the document, and could lead to some strangely displayed pages if the document contains pages of different sizes. Version 0.1.2 fixes this issue.

- Install: the same as 0.1.1. If you have already installed 0.1.1, extract the newer version to the same location, overwriting the old files. Then run 'Install DjVu plugin' again.
Attached Files
File Type: zip DjVu-Plugin-0.1.2.zip (855.6 KB, 123 views)
luite is offline   Reply With Quote
 
Advertisement
Old 02-02-2010, 05:10 PM   #3
Viacheslav
Connoisseur
Viacheslav doesn't litterViacheslav doesn't litter
 
Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
Quote:
Originally Posted by luite View Post
- gconf schemas are overwritten to add the djvu file format:
/etc/gconf/gconf.xml.defaults/%gconf-tree.xml
/etc/gconf/schemas/ctb.schemas
This is not a good idea. You can simply add your own custom schemas along the default ones. Deinstallation will be easier and multiple additional filetypes can be added independently. There is a ready-made schemas pack for djvu, which only needs a different viewer launch command.
Viacheslav is offline   Reply With Quote
Old 02-02-2010, 05:30 PM   #4
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Quote:
Originally Posted by Viacheslav View Post
This is not a good idea. You can simply add your own custom schemas along the default ones. Deinstallation will be easier and multiple additional filetypes can be added independently. There is a ready-made schemas pack for djvu, which only needs a different viewer launch command.
I have seen that file, the problem is that it needs to add the schema to gconf, storing the result in /home/root/.gconf/.

When the user updates his firmware, all required files for the DjVu plugin will be gone, but /home/root/.gconf/ will still contain the configuration for the file type.

I agree that it's not very flexible to just overwrite the existing schema's, but I prefer everything to be completely removed when the firmware is reinstalled.
luite is offline   Reply With Quote
Old 02-03-2010, 03:35 AM   #5
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
The problem with the approach you have choosen is that on my DR the settings for the Recent Files patch and the binding of xournal files would be lost, since you are replacing gconf with a different version. If more people start sending updates with this mechanism, only one update can be active.

Did you look at the update/restore-script that came with the 'evince file-extension' patch? They might be sufficient for your patch also (with a small modification). Maybe for your next update?

W.r.t. the mobipocket plugin did you already see the problems in the emulator or only on the actual device?

Thanks Very Much for creating this viewer and sharing it with us.
Mackx is offline   Reply With Quote
Old 02-03-2010, 05:42 AM   #6
godel10
Connoisseur
godel10 doesn't littergodel10 doesn't littergodel10 doesn't litter
 
Posts: 80
Karma: 204
Join Date: Jun 2007
Device: Sony Librie, Irex DR1000S
The possibility to use djvu files as pdf ones is really exciting. Thank you very much for this tool.

Right now, I am trying to use this patch, but unfortunately every time I try to open a djvu file it uses evince. How can I force to use your patch to open djvu files? [I have already used the "djvurestore.sh" script provided with evince]

By the way, one final question. Now that we use the same viewer than for pdf files, do you think it may be possible to have some software merging scribbles for djvu files?
godel10 is offline   Reply With Quote
Old 02-03-2010, 06:32 AM   #7
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Quote:
Originally Posted by godel10 View Post
Right now, I am trying to use this patch, but unfortunately every time I try to open a djvu file it uses evince. How can I force to use your patch to open djvu files? [I have already used the "djvurestore.sh" script provided with evince]
You can shutdown the DR, remove the SD-card and modify the following doc-djvu entries in /System/dr1000.ini file:

/apps/er/sys/ctb/filetypes/doc-djvu/icon_name=djvu
/apps/er/sys/ctb/filetypes/doc-djvu/viewer_cmd=uds

Next time you restart the DR, these settings will be used. (Note that shutting it down while modifying the dr1000.ini file is important.)
Mackx is offline   Reply With Quote
Old 02-03-2010, 07:11 AM   #8
owl123
Addict
owl123 doesn't litterowl123 doesn't litterowl123 doesn't litter
 
Posts: 233
Karma: 214
Join Date: Nov 2008
Device: iPad, Samsung Galaxy Note
Does removing the mobipocket plugin mean there's no dictionary support anymore for PDFs? (DR1000S supports only mobipocket dictionaries.)
owl123 is offline   Reply With Quote
Old 02-03-2010, 07:11 AM   #9
RobbieClarken
Addict
RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.RobbieClarken ought to be getting tired of karma fortunes by now.
 
Posts: 372
Karma: 1002274
Join Date: Mar 2008
Location: Australia
Device: Kindle
Thanks luite, it runs smoothly and is very fast. Haven't encountered any bugs yet.
RobbieClarken is offline   Reply With Quote
Old 02-03-2010, 10:10 AM   #10
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Quote:
Originally Posted by Mackx View Post
The problem with the approach you have choosen is that on my DR the settings for the Recent Files patch and the binding of xournal files would be lost, since you are replacing gconf with a different version. If more people start sending updates with this mechanism, only one update can be active.
Hmm, that is a problem. I'll look into this, possibly the next update.

Quote:
W.r.t. the mobipocket plugin did you already see the problems in the emulator or only on the actual device?
It is a problem on both the actual device and the emulator. Opening a djvu file results in an error message: "'filename.djvu' cannot be opened"

Looking at the debug output of the emulator, these are the relevant error messages:
(ERROR)uds_plugin_manager.cpp:150,get_plugin_path( ) No matched plugin for .djvu
com.mobipocket.common.library.reader.InvalidBookEx ception: Corrupted
at com.mobipocket.common.library.reader.BookItem.<ini t>(libuds-plugin-mobipocket.so)
(ERROR)../plugin_impl/reader_impl.cpp:2302,get_error_code() This book is corrupted.
(ERROR)uds_doc_manager.cpp:149,open_document() Error opening document for /media/mmcblk0p1/test.djvu

After the first error, the plugin is queried (through IPluginLibrary) to check whether the document is supported. Even though the plugin tells UDS that the file is supported if its extension is .djvu or .djv, it still queries the mobipocket plugin afterwards.

I'm not sure what goes wrong, as both UDS and the mobipocket plugin are closed source. Perhaps I didn't implement some interface correctly.
luite is offline   Reply With Quote
Old 02-03-2010, 10:21 AM   #11
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Another small update (was actually already done yesterday, so the installation procedure has not yet been improved, sorry for that). This update improves the handling of scanned djvu documents with two facing pages per djvu image.

It is actually a hack (I'm not sure if it's possible for plugins to add new view modes to the popup menu, will look into that later) that looks at the filename of the djvu file. If the filename ends in 2pg.djvu, the plugin will show the left and right half of each image separately, doubling the page count in the viewer.

Of course, the real solution is to recompress the whole djvu file and properly crop each page, but this quick fix should at least make those files much more usable on the reader.
Attached Files
File Type: zip DjVu-Plugin-0.1.3.zip (855.9 KB, 129 views)
luite is offline   Reply With Quote
Old 02-03-2010, 11:01 AM   #12
Mackx
Guru
Mackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to beholdMackx is a splendid one to behold
 
Posts: 998
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
Hi luite,

I created some new installation scripts, which work for me, even if I have installed evince before.
- It installs the schema file with the doc-djvu configuration items (this will set non exsisting values to the default values.)
- Overwrites some of the config values (this will overwrite exsisting values)
- If forces a copy of the dr1000.ini file to be written with the latest settings
- removes the mobipocket plug (making a copy for un-install)
- copies all required files

Please change it as you like and use for one of your coming updates.


I am hoping that Gertjan can give some more info on the problem you see with the mobipocket plugin.
Attached Files
File Type: zip _djvuplugin.zip (2.1 KB, 128 views)
Mackx is offline   Reply With Quote
Old 02-03-2010, 11:05 AM   #13
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Quote:
Originally Posted by godel10 View Post
The possibility to use djvu files as pdf ones is really exciting. Thank you very much for this tool.
By the way, one final question. Now that we use the same viewer than for pdf files, do you think it may be possible to have some software merging scribbles for djvu files?
It's certainly possible in theory, but I'm afraid that I don't have enough time to write such a program (perhaps later ).

If you can render the scribbles for a single page to an image with the correct resolution, it should be fairly easy to do using imagemagick and djvulibre. The steps for each page with scribbles would consist of:
- extract and decompress djvu page ( djvulibre - ddjvu )
- render scribbles for the page to an image file (own tool, does one already exist?)
- create composite image with scribbles and page ( imagemagick - convert and composite )
- convert image to djvu (djvulibre - not sure which program should be used)
- replace page in original document ( djvulibre - djvm)

The only real issue is the second step, which is not specific to djvu. Recompressing pages may increase the file size of the document (or decrease quality if lossy compression is used).

Last edited by luite; 02-03-2010 at 11:34 AM.
luite is offline   Reply With Quote
Old 02-03-2010, 11:24 AM   #14
luite
Connoisseur
luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.luite has a complete set of Star Wars action figures.
 
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
Quote:
Originally Posted by Mackx View Post
Hi luite,

I created some new installation scripts, which work for me, even if I have installed evince before.
Thanks for the help, I'll include them in the next release.
luite is offline   Reply With Quote
Old 02-03-2010, 12:23 PM   #15
badbob001
Evangelist
badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.badbob001 ought to be getting tired of karma fortunes by now.
 
badbob001's Avatar
 
Posts: 447
Karma: 1042602
Join Date: Sep 2009
Device: Kindle 3 (US 3G)
Hopefully when irex brings out the update to the dr1000, they will have an on-device method to merge scribbles to pdf and that method can be used for other document types.
badbob001 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
DjVu Plugin for DR1000 - version 0.2 luite iRex 30 10-18-2010 04:49 PM
Beta testers wanted mtravellerh PocketBook 47 09-15-2010 05:22 PM
Wanted: DjVu Plugin for DR800 martienne iRex 14 06-07-2010 06:57 PM
Beta testers wanted: MobileRead goes Unicode Alexander Turcic Announcements 0 08-12-2009 11:28 AM


All times are GMT -4. The time now is 03:53 PM.


MobileRead.com is a privately owned, operated and funded community.