02-02-2010, 02:35 PM | #1 |
Connoisseur
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. Last edited by luite; 02-03-2010 at 09:23 AM. Reason: added version 0.1.3 |
02-02-2010, 04:09 PM | #2 |
Connoisseur
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. |
Advert | |
|
02-02-2010, 04:10 PM | #3 |
Connoisseur
Posts: 59
Karma: 136
Join Date: Dec 2008
Device: iRex DR1000
|
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.
|
02-02-2010, 04:30 PM | #4 | |
Connoisseur
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
|
Quote:
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. |
|
02-03-2010, 02:35 AM | #5 |
Guru
Posts: 999
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. |
Advert | |
|
02-03-2010, 04:42 AM | #6 |
Connoisseur
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? |
02-03-2010, 05:32 AM | #7 | |
Guru
Posts: 999
Karma: 19985
Join Date: Dec 2008
Location: Netherlands
Device: iRex DR1000S
|
Quote:
/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.) |
|
02-03-2010, 06:11 AM | #8 |
Addict
Posts: 234
Karma: 214
Join Date: Nov 2008
Device: Galaxy Note 3, Galaxy NotePro 12.2, InkBook
|
Does removing the mobipocket plugin mean there's no dictionary support anymore for PDFs? (DR1000S supports only mobipocket dictionaries.)
|
02-03-2010, 06:11 AM | #9 |
Addict
Posts: 371
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.
|
02-03-2010, 09:10 AM | #10 | ||
Connoisseur
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
|
Quote:
Quote:
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. |
||
02-03-2010, 09:21 AM | #11 |
Connoisseur
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. |
02-03-2010, 10:01 AM | #12 |
Guru
Posts: 999
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. |
02-03-2010, 10:05 AM | #13 | |
Connoisseur
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
|
Quote:
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 10:34 AM. |
|
02-03-2010, 10:24 AM | #14 |
Connoisseur
Posts: 82
Karma: 256
Join Date: Feb 2010
Location: Netherlands
Device: dr1000
|
|
02-03-2010, 11:23 AM | #15 |
Fanatic
Posts: 556
Karma: 1102020
Join Date: Sep 2009
Device: Kindle Keyboard (rip), Kindle Voyage, Fire Tablet 10 '17, iPad '19
|
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.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
DjVu Plugin for DR1000 - version 0.2 | luite | iRex | 30 | 10-18-2010 03:49 PM |
Beta testers wanted | mtravellerh | PocketBook | 47 | 09-15-2010 04:22 PM |
Wanted: DjVu Plugin for DR800 | martienne | iRex | 14 | 06-07-2010 05:57 PM |
Beta testers wanted: MobileRead goes Unicode | Alexander Turcic | Announcements | 0 | 08-12-2009 10:28 AM |