|
|
View Full Version : idjvu
scotty1024 10-26-2006, 10:41 AM I'm going to take the iRex toolchain out for a spin and see how quickly I can convert ipdf into idjvu.
I expect to have something later today. Of course only those with 2.7 and not 2.7.1 will be able to use it.
arivero 10-26-2006, 10:44 AM I'm going to take the iRex toolchain out for a spin and see how quickly I can convert ipdf into idjvu.
Guess you are going to remove most of the code! But it is an interesting approach.
arivero 10-26-2006, 11:06 AM ipdf needs of the iRex toolchain more than expected; the headers of xpdf "popper" are also slighly modified respect to xpdf, as I found doing a grep for "iRex" in the includes.
scotty1024 10-26-2006, 11:24 AM Correct, ipdf is the "front end", sort of a "PDF Panel" that renders from the popper libraries.
Most of the ipdf code will be retained, I'll just slide in a djvu rendering library.
Once its working it might be interesting to make a PDF/DJVU multi-capable app.
Next would be to produce one that was tabbed so one could have several documents open at the same time. Or maybe I have the order backwards (tabs then multi-format). :)
nekokami 10-26-2006, 11:48 AM @scotty1024, iRex needs to set up an affiliate program so I can credit you with my sale when I buy one. :D
@scotty1024, iRex needs to set up an affiliate program so I can credit you with my sale when I buy one. :D
Good idea! ;)
The same for CommanderROR who made it possible that the first 50 or so units were handed out to MobileReaders.
scotty1024 10-26-2006, 02:33 PM Uh this may sound silly, but could one of you djvu lovers out there post a link to a djvu file?
I just looked around and I don't have any of them. :)
arivero 10-26-2006, 02:39 PM Uh this may sound silly, but could one of you djvu lovers out there post a link to a djvu file?
I just looked around and I don't have any of them. :)
Man, there was a HUGE one in my http://dftuz.unizar.es/~rivero/lbdjvu.tgz named ebook307.djvu
Also http://dftuz.unizar.es/~rivero/galindoQM1.djvu is a bit smaller (4MB)
scotty1024 10-26-2006, 02:54 PM Mmm, Quantum Mechanics, tasty. :)
Thank you, that will do nicely.
arivero 10-27-2006, 07:08 AM Mmm, Quantum Mechanics, tasty. :)
Problem with .djvu books is that they are mostly copyrighted books; these are the two ones where I know personally to the owners of the rights and I am asuming a "limited license for proofs in very high technology devices" :cool:
scotty1024 10-27-2006, 08:32 AM I have the backend library compiled. I've started the front end and will hopefully get it finished today during down times.
I don't think iRex supplied an answer to the autoconf issue so I'm still having to build Makefiles by hand. That will be chewing up a bit of what little time I'll have for this. :(
But I still think I'll have something to take out for a spin later today. Assuming you didn't upgrade to 2.7.1 that is, and based on the download numbers for ipdf that seems to be an all too small number of you out there, sigh...
Matthijs 10-27-2006, 10:02 AM I don't think iRex supplied an answer to the autoconf issue so I'm still having to build Makefiles by hand. That will be chewing up a bit of what little time I'll have for this. :(
Edit: I totally missed your post about the autoconf issue Scotty. I will post the details.
Uh this may sound silly, but could one of you djvu lovers out there post a link to a djvu file?
There are also some in the benchmarks section at djvuzone:
http://www.djvuzone.org/djvu/photos/jpgvsdjvu01/index.html
scotty1024 10-28-2006, 06:07 PM A quick status blip on idjvu.
All the DJVU front end code is done, has been done for hours. Back end library has been compiled for 2 days now.
I'm flailing like a Dolphin caught in a tuna net as I try to break all the dependences on poppler in iRex's ipdf threaded rendering engine.
When I get done the code base will be better for it as it will be much easier to use it to build other viewers.
By the way, what is the next file format on everyone's list?
scotty1024 10-28-2006, 06:10 PM There are also some in the benchmarks section at djvuzone:
http://www.djvuzone.org/djvu/photos/jpgvsdjvu01/index.html
I'd been digging in there but could never find anything I could click and download. :(
So far the Quantum DJVU file is tiding me over. But I must admit I feel weird building a viewer for a file format I have but a single instance of! You all really are going to owe me for this one. :D
arivero 10-28-2006, 06:48 PM So far the Quantum DJVU file is tiding me over. But I must admit I feel weird building a viewer for a file format I have but a single instance of! You all really are going to owe me for this one. :D
There is also some String Theory available, but I am sure you will prefer a trustyworthy theory :D
Believe me there is some more instances. But it is true, DJVU is about some different page description formats packaged as if it were a single file, so a single instance is risky. Basically DJVu has three layers: background, foreground and OCR. The latter one can be empty, as well as background. Background admits a couple of compresion/smoothing formats, while foreground is about the real trick, a compression able to locate letter shapes and use them as patterns of compression. DjVuPhoto is, I guess, one of the allowed formats for background.
Basically, this means that a serious testing would need of about half dozen of different files: with and without OCR, with and without background, and some different backgrounds. Most people having DJVU files usualy ignores the fine details of each file, somehow they are not surprised about being able to search for text in an scanned document! (btw, I do not think we need search tools for the moment).
As I told elsewere, I see no problem about doing it microsoft-way: first release the program, then wait for users to tell about the bugs.
indeed, scotty, we do owe you something. I think at least a couple of beers, whenever you are somewhere an iliad owner lives :)
(or do you want to open a paypal account?)
Next thing on my file format list would be rtf, but this is already covered with easy pdf transformation.
There's something else i've been thinking about:
Most digital cameras use sd cards nowadays. Should it be possible to aquire content without computer in between?
There are two problems when simply taking photos of book pages / documents: You can't easily flip through images (yet) and the pages are usually quite skewed.
Deskewing by pointing on the 4 corners should be sufficient for the beginning, how to do a prettier deskewing by recognizing lines and their shape, i don't know (yet).
Gavrahil 10-29-2006, 05:13 AM To tell you the truth I once played around a little with djvu, and made a few test-files. But I simply have to say that I was rather disappointed, since the letter-fonts were completely distorted and there was no trace of anti-aliasing. Also the export-process was rather tedious and very, very slow even on my 3GHz machine.
All in all I had the impression that this format was rether excellent for the archival of old material, since it was able to create very small files even if all your pages were just scanned in. But it is by no means a comfortable reading experience.
Just my two cent.
scotty1024 10-29-2006, 06:08 AM Well if there were any anti-aliasing I'm sure IW44 would buff that right off the characters to continue to achieve its rather impressive compression ratio.
The Quantum Physics book I'm using as my proofing reference looks pretty nice though.
scotty1024 10-30-2006, 06:01 PM Current status is that djvulibre, the iRex tool chain and I are having a major nuclear melt down.
I compiled djvulibre last week and ran the command line tools on the iLiad and extracted and proofed Quantum pages on the iLiad.
Seemed like a slam dunk to go from that great start to having a idjvu up and going.
Well I had to refactor ipdf a bit more than I expected to remove poppler dependences.
But the real trouble began when I got it all coded up and tried to link it. For last two days I've been unable to link even a single method out of djvulibre into idjvu. You can put -ldjvulibre in or have it out, same list of link failures. You can put in -ldjvulibre2 and it complains no library found. You can put -ldjvulibre in and remove the actual library and it complains the library isn't found.
I'm in hell... but I'll find my way out.
Antartica 10-31-2006, 02:50 AM But the real trouble began when I got it all coded up and tried to link it. For last two days I've been unable to link even a single method out of djvulibre into idjvu. You can put -ldjvulibre in or have it out, same list of link failures. You can put in -ldjvulibre2 and it complains no library found. You can put -ldjvulibre in and remove the actual library and it complains the library isn't found.
I'm in hell... but I'll find my way out.
Sorry if it's obvious: Have you tested with -Lpath/to/library ? And with -Wl,-rpath,/path/to/library:/usr/lib:NONE ?
scotty1024 10-31-2006, 04:10 AM Sorry if it's obvious: Have you tested with -Lpath/to/library ? And with -Wl,-rpath,/path/to/library:/usr/lib:NONE ?
As I wrote, it finds the library, it just can't find anything to bind to in it. If I "rm /usr/local/arm/oe/arm-linux/lib/libdjvulibre.so" then try to link it complains that the library is missing.
And yet when the library is there I get:
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x14): undefined reference to `DjVuPort::id_to_url(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x18): undefined reference to `DjVuPort::id_to_file(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x1c): undefined reference to `DjVuSimplePort::request_data(DjVuPort const*, GURL const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x20): undefined reference to `DjVuSimplePort::notify_error(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x24): undefined reference to `DjVuSimplePort::notify_status(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x28): undefined reference to `DjVuPort::notify_redisplay(DjVuImage const*)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x2c): undefined reference to `DjVuPort::notify_relayout(DjVuImage const*)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x30): undefined reference to `DjVuPort::notify_chunk_done(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x34): undefined reference to `DjVuPort::notify_file_flags_changed(DjVuFile const*, long, long)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x38): undefined reference to `DjVuPort::notify_doc_flags_changed(DjVuDocument const*, long, long)'
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x3c): undefined reference to `DjVuPort::notify_decode_progress(DjVuPort const*, float)'
main.o(.gnu.linkonce.r._ZTI14DjVuSimplePort+0x8): undefined reference to `typeinfo for DjVuPort'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x14): undefined reference to `DjVuPort::id_to_url(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x18): undefined reference to `DjVuPort::id_to_file(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x1c): undefined reference to `DjVuMemoryPort::request_data(DjVuPort const*, GURL const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x20): undefined reference to `DjVuPort::notify_error(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x24): undefined reference to `DjVuPort::notify_status(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x28): undefined reference to `DjVuPort::notify_redisplay(DjVuImage const*)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x2c): undefined reference to `DjVuPort::notify_relayout(DjVuImage const*)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x30): undefined reference to `DjVuPort::notify_chunk_done(DjVuPort const*, GUTF8String const&)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x34): undefined reference to `DjVuPort::notify_file_flags_changed(DjVuFile const*, long, long)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x38): undefined reference to `DjVuPort::notify_doc_flags_changed(DjVuDocument const*, long, long)'
main.o(.gnu.linkonce.r._ZTV14DjVuMemoryPort+0x3c): undefined reference to `DjVuPort::notify_decode_progress(DjVuPort const*, float)'
main.o(.gnu.linkonce.r._ZTI14DjVuMemoryPort+0x8): undefined reference to `typeinfo for DjVuPort'
main.o(.gnu.linkonce.t._ZNK14DjVuSimplePort8inheri tsERK11GUTF8String+0x14): In function `DjVuSimplePort::inherits(GUTF8String const&) const':
/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1298: undefined reference to `GStringRep::cmp(GP<GStringRep> const&, char const*, int)'
main.o(.gnu.linkonce.t._ZNK14DjVuSimplePort8inheri tsERK11GUTF8String+0x3c):/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1298: undefined reference to `GStringRep::cmp(GP<GStringRep> const&, char const*, int)'
main.o(.gnu.linkonce.t._ZNK14DjVuMemoryPort8inheri tsERK11GUTF8String+0x14): In function `DjVuMemoryPort::inherits(GUTF8String const&) const':
/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1298: undefined reference to `GStringRep::cmp(GP<GStringRep> const&, char const*, int)'
main.o(.gnu.linkonce.t._ZNK14DjVuMemoryPort8inheri tsERK11GUTF8String+0x3c):/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1298: undefined reference to `GStringRep::cmp(GP<GStringRep> const&, char const*, int)'
main.o(.gnu.linkonce.t._ZN14DjVuSimplePortD1Ev+0xc ): In function `DjVuSimplePort::~DjVuSimplePort()':
/home/irex/idjvu/src/main.cc:80: undefined reference to `DjVuPort::~DjVuPort()'
main.o(.gnu.linkonce.t._ZN14DjVuSimplePortD0Ev+0x1 0): In function `DjVuSimplePort::~DjVuSimplePort()':
/home/irex/idjvu/src/main.cc:80: undefined reference to `DjVuPort::~DjVuPort()'
main.o(.gnu.linkonce.t._ZN14DjVuSimplePortD0Ev+0x1 c):/home/irex/idjvu/src/main.cc:80: undefined reference to `DjVuPort::operator delete(void*)'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD1Ev+0x5 c): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/home/irex/idjvu/src/main.cc:80: undefined reference to `GSetBase::~GSetBase()'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD1Ev+0x6 c): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/usr/local/arm/oe/arm-linux/include/djvu/GThreads.h:446: undefined reference to `DjVuPort::~DjVuPort()'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD1Ev+0x9 c):/usr/local/arm/oe/arm-linux/include/djvu/GThreads.h:446: undefined reference to `DjVuPort::~DjVuPort()'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD0Ev+0x5 c): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/home/irex/idjvu/src/main.cc:80: undefined reference to `GSetBase::~GSetBase()'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD0Ev+0x6 c): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/usr/local/arm/oe/arm-linux/include/djvu/GThreads.h:446: undefined reference to `DjVuPort::~DjVuPort()'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD0Ev+0x7 4): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/home/irex/idjvu/src/main.cc:80: undefined reference to `DjVuPort::operator delete(void*)'
main.o(.gnu.linkonce.t._ZN14DjVuMemoryPortD0Ev+0xa 4): In function `DjVuMemoryPort::~DjVuMemoryPort()':
/usr/local/arm/oe/arm-linux/include/djvu/GThreads.h:446: undefined reference to `DjVuPort::~DjVuPort()'
DJVUCore.o(.text+0x140): In function `CDJVUCore::getPageBasicInfo(CPageInfo&)':
/usr/local/arm/oe/arm-linux/include/djvu/DjVuDocument.h:607: undefined reference to `DjVuDocument::get_page(int, bool, DjVuPort*) const'
DJVUCore.o(.text+0x154): In function `CDJVUCore::getPageBasicInfo(CPageInfo&)':
/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:431: undefined reference to `GPBase::assign(GPBase const&)'
DJVUCore.o(.text+0x174):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x184):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:413: undefined reference to `DjVuImage::get_real_width() const'
DJVUCore.o(.text+0x19c):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:413: undefined reference to `DjVuImage::get_real_height() const'
DJVUCore.o(.text+0x1b0):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:413: undefined reference to `DjVuImage::get_rotate() const'
DJVUCore.o(.text+0x1e4):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x224):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x23c):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x458): In function `CDJVUCore::getNumPages()':
/home/irex/idjvu/src/DJVUCore.cpp:158: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0x4c8): In function `CDJVUCore::renderPage(CPageInfo&, int, int, int, int (*)(void*), void*)':
/home/irex/idjvu/src/DJVUCore.cpp:174: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0x4ec):/home/irex/idjvu/src/DJVUCore.cpp:176: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0x574): In function `CDJVUCore::renderPage(CPageInfo&, int, int, int, int (*)(void*), void*)':
/usr/local/arm/oe/arm-linux/include/djvu/DjVuDocument.h:607: undefined reference to `DjVuDocument::get_page(int, bool, DjVuPort*) const'
DJVUCore.o(.text+0x5d0): In function `CDJVUCore::renderPage(CPageInfo&, int, int, int, int (*)(void*), void*)':
/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:413: undefined reference to `DjVuImage::get_bitmap(GRect const&, GRect const&, int) const'
DJVUCore.o(.text+0x6f4):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x714):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x750):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x768):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x7ac): In function `CDJVUCore::renderPage(CPageInfo&, int, int, int, int (*)(void*), void*)':
/usr/local/arm/oe/arm-linux/include/djvu/GBitmap.h:570: undefined reference to `GBitmap::uncompress()'
DJVUCore.o(.text+0x818): In function `CDJVUCore::renderPage(CPageInfo&, int, int, int, int (*)(void*), void*)':
/home/irex/idjvu/src/DJVUCore.cpp:223: undefined reference to `GBitmap::zerobuffer'
DJVUCore.o(.text+0x84c): In function `CDJVUCore::getPageType(int)':
/home/irex/idjvu/src/DJVUCore.cpp:239: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0x8c4): In function `CDJVUCore::getZoomMax(int)':
/home/irex/idjvu/src/DJVUCore.cpp:239: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0xb2c): In function `CDJVUCore::verifyZoomMax(double, int)':
/home/irex/idjvu/src/DJVUCore.cpp:239: undefined reference to `DjVuDocument::get_pages_num() const'
DJVUCore.o(.text+0xe1c): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1469: undefined reference to `GUTF8String::GUTF8String(char const*)'
DJVUCore.o(.text+0xe30):/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1469: undefined reference to `GURL::Filename::UTF8::UTF8(GUTF8String const&)'
DJVUCore.o(.text+0xe44):/usr/local/arm/oe/arm-linux/include/djvu/GString.h:1469: undefined reference to `GURL::GURL(GURL const&)'
DJVUCore.o(.text+0xeb4): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0xec4): In function `CDJVUCore::open(GooString*, void*)':
/home/irex/idjvu/src/DJVUCore.cpp:78: undefined reference to `GNativeString::~GNativeString()'
DJVUCore.o(.text+0xee0): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:345: undefined reference to `GPBase::assign(GPEnabled*)'
DJVUCore.o(.text+0xefc):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:345: undefined reference to `DjVuDocument::create_wait(GURL const&, GP<DjVuPort>, DjVuFileCache*)'
DJVUCore.o(.text+0xf18):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0xf38):/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0xf50): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/DjVuDocument.h:944: undefined reference to `GSafeFlags::operator long() const'
DJVUCore.o(.text+0x1040): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0x1170):/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0x12cc): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/GSmartPointer.h:362: undefined reference to `GPEnabled::unref()'
DJVUCore.o(.text+0x1360): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0x1404):/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0x141c): In function `CDJVUCore::open(GooString*, void*)':
/home/irex/idjvu/src/DJVUCore.cpp:78: undefined reference to `GNativeString::~GNativeString()'
DJVUCore.o(.text+0x1484): In function `CDJVUCore::open(GooString*, void*)':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.text+0x15b8):/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.gnu.linkonce.t._ZN4GURL8Filename4UTF8D 1Ev+0xf8): In function `GURL::Filename::UTF8::~UTF8()':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.gnu.linkonce.t._ZN4GURL8Filename4UTF8D 1Ev+0x1c4):/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.gnu.linkonce.t._ZN4GURL8Filename4UTF8D 0Ev+0xec): In function `GURL::Filename::UTF8::~UTF8()':
/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: undefined reference to `GUTF8String::~GUTF8String()'
DJVUCore.o(.gnu.linkonce.t._ZN4GURL8Filename4UTF8D 0Ev+0x1c0):/usr/local/arm/oe/arm-linux/include/djvu/Arrays.h:764: more undefined references to `GUTF8String::~GUTF8String()' follow
collect2: ld returned 1 exit status
Antartica 10-31-2006, 04:45 AM As I wrote, it finds the library, it just can't find anything to bind to in it. If I "rm /usr/local/arm/oe/arm-linux/lib/libdjvulibre.so" then try to link it complains that the library is missing.
And yet when the library is there I get:
main.o(.gnu.linkonce.r._ZTV14DjVuSimplePort+0x14): undefined reference to `DjVuPort::id_to_url(DjVuPort const*, GUTF8String const&)'
Both idjvu and libdjvulibre.so are c++ programs, so to be able to link them it's necessary to compile them using the same c++ compiler (sorry, there is no ABI stability for c++). At least, I think that this is what is causing you headaches.
So, you have to recompile libdjvulibre.so using the same toolchain that compiles idjvu.
Rationale: the name mangling algorithm to encode function names plus the classes to which they belong changes between different revisions of the g++ compiler to avoid problems of linking between incompatible versions of the ABI (aplication binary interface) of the generated objects, AFAIK.
An alternative solution is to declare an 'extern "C" { /* ... */ }' API for djvulibre.so using the C++ functions, so you export C functions, and those doesn't need to be mangled, have and stable ABI, so they always work.
(Rant)
As a matter of fact, I don't know why there are libraries distributed that export methods as c++ implementations. I sincerely expect libraries to export C APIs, independently of the language in which they're implemented. And if you want to have a C++ API, it's almost trivial to distribute a thin wrapper (c++ bindings) to be compiled with the program so that it present classes to the library user...
That is, if you're not using KDE. If you use KDE, libraries are c++ and you recopile everything whenever you update your compiiler X-).
(End of rant)
scotty1024 10-31-2006, 07:48 AM Both idjvu and libdjvulibre.so are c++ programs, so to be able to link them it's necessary to compile them using the same c++ compiler (sorry, there is no ABI stability for c++). At least, I think that this is what is causing you headaches.
Yep, I know all that. But alas they are both compiled with the iRex tool chain. :(
My best guess is some switch difference that is perturbing the mangling, sigh.
I like your idea of converting to C API though, thanks! :)
Mike Kostousov 10-31-2006, 11:10 AM Do you have "libdjvulibre.la" file?
scotty1024 10-31-2006, 12:52 PM Do you have "libdjvulibre.la" file?
Yes, and libtool changes that to a reference to .libs/libdjvulibre.so.
scotty1024 10-31-2006, 01:03 PM Performance isn't wonderful but the tool grabs screens from the iLiad and turns them into PNG's.
Source is here: http://www.sfires.net/fbshot/ (and attached)
Compiled binary for iLiad is attached.
To compile it with iRex's tool chain I use: arm-linux-gcc -O3 -o fbshot fbshot.c -lpng12 -lz -lm
I've attached some screen shots I made showing off the new ipdf in action. horse.png and text.png are from Real Soldiers of Fortune as scanned by Paul.
Text2.png comes from 1635: Cannon Law by Eric Flint and Andrew Dennis a Baen RTF file I converted to a PDF using Tiresias as the font.
And yes, that's my clock bumping the PDF tools to the left (a bug I'm currently stomping on).
scotty1024 10-31-2006, 02:07 PM Here are the same pages rendered via 2.7's ipdf (called xpdf back then). You can see how the error dispersion routine is chewing into the sides of glyphs making the text a bit "moth eaten".
I think the horse looks better using a pure 8 bit path but part of the fun with error dispersion is that one person's "better" is another person's "worse". :)
ElaHuguet 10-31-2006, 02:26 PM I agree, Scotty, both text and images look better. :)
Matthijs 11-01-2006, 02:12 AM Please note that you would have to do a linear conversion to the 16 iLiad grays to be able to see what it actually looks like on the device. The images in the framebuffer have all 8bit grays but will be linearly converted to 16 grays in the eink framebuffer driver before being flushed to the display controller.
Only after that conversion you can compare these screenshots accurately as they would look on-screen.
arivero 11-01-2006, 05:14 AM Please note that you would have to do a linear conversion to the 16 iLiad grays to be able to see what it actually looks like on the device. The images in the framebuffer have all 8bit grays but will be linearly converted to 16 grays in the eink framebuffer driver before being flushed to the display controller.
Only after that conversion you can compare these screenshots accurately as they would look on-screen.
Indeed, as it was already told in other thread, the Xfvdev server does not suport any intermediate between 8 bits and 1 bit (contrary to "specification" in the man page), so here iRex is doing the best possible approach: go with 8, and mod it out in the driver or in the hardware.
scotty1024 11-01-2006, 04:26 PM We officially have smoke!
root@ereader:/media/cf# ./idjvu galindoQM1.djvu
(L)eripc.c:217,erIpcStartClient() Sending messages to 127.0.0.1
(L)eripc.c:217,erIpcStartClient() Sending messages to 127.0.0.1
(L)eripc.c:217,erIpcStartClient() Sending messages to 127.0.0.1
(W)eripc.c:37,erIpcInitServer() Version: 256
(W)eripc.c:76,erIpcInitServer() Bound successfully to 0.0.0.0:50067.
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
(PV_L)RenderThread.cpp:99,start() Create render thread done!
(PV_L)PDFApp.cpp:161,open() Open document galindoQM1.djvu
(PV_L)PDFApp.cpp:164,open() Open document galindoQM1.djvu done!
(PV_E)PDFView.cpp:319,displayPage() Invalid page number -1!
More when I teach it the correct page number to use. :D
scotty1024 11-01-2006, 04:53 PM Well its read the page 1, rendered it but something is not noticing rendering completed. Soo close but gotta run. More after dinner folks.
But check out that render time...
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
(PV_L)RenderThread.cpp:99,start() Create render thread done!
(PV_L)PDFApp.cpp:161,open() Open document galindoQM1.djvu
(PV_L)PDFCore.cpp:111,open() Document has 431 pages.
(PV_L)PDFApp.cpp:164,open() Open document galindoQM1.djvu done!
(PV_L)PDFView.cpp:340,displayPage() Page 1 NOT ready yet!
(PV_L)PDFView.cpp:340,displayPage() Page 1 NOT ready yet!
(PV_L)RenderThread.cpp:163,renderPageNow() Page 1 is in rendering!
(PV_E)PDFCore.cpp:167,renderPage() 519710 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 290297 page render time return 0
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
scotty1024 11-01-2006, 05:15 PM Houston we've had a Quantum Event!
(PV_L)RenderThread.cpp:99,start() Create render thread done!
(PV_L)PDFApp.cpp:161,open() Open document galindoQM1.djvu
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
(PV_L)PDFCore.cpp:111,open() Document has 431 pages.
(PV_L)PDFApp.cpp:164,open() Open document galindoQM1.djvu done!
(PV_L)PDFView.cpp:324,displayPage() Going to display the page 1 current page -1
(PV_L)PDFView.cpp:340,displayPage() Page 1 NOT ready yet!
(PV_L)PDFView.cpp:324,displayPage() Going to display the page 1 current page 1
(PV_L)PDFView.cpp:340,displayPage() Page 1 NOT ready yet!
(PV_L)PDFView.cpp:324,displayPage() Going to display the page 1 current page 1
(PV_L)PDFView.cpp:340,displayPage() Page 1 NOT ready yet!
(PV_E)PDFCore.cpp:167,renderPage() 513070 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 289200 page render time return 0
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 1
(PV_L)XMgr.cpp:167,drawImage() In Drawimage
PageList:
page 1 zoom -1.000000 rotate 0 time 5
(PV_E)PDFCore.cpp:167,renderPage() 439485 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 364672 page render time return 0
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 2
(PV_E)PDFCore.cpp:167,renderPage() 350319 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 371985 page render time return 0
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 3
(PV_E)PDFCore.cpp:167,renderPage() 223740 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 298527 page render time return 0
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 4
(PV_E)PDFCore.cpp:167,renderPage() 342393 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 382408 page render time return 0
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 5
(PV_E)PDFCore.cpp:167,renderPage() 408717 page decoding time
(PV_E)PDFCore.cpp:236,renderPage() 404321 page render time return 0
(PV_L)RenderThread.cpp:229,threadProc() Waiting...
(PV_L)PDFView.cpp:442,onPageRendered() onPageRender 6
Many thanks to Antartica for his patience with me in getting his tool chain setup. He helped make this possible.
CommanderROR 11-01-2006, 05:17 PM You did it once again Scotty!
I don't really know what idjvu is all about, but congrats anyway...I'm pretty sure that those who own djvu files will be very happy to hear of your success...
scotty1024 11-01-2006, 05:42 PM You did it once again Scotty!
I don't really know what idjvu is all about, but congrats anyway...I'm pretty sure that those who own djvu files will be very happy to hear of your success...
Thanks!
I must admit I only have the one DJVU file myself! :D
Mike Kostousov 11-01-2006, 09:17 PM Scotty, where can I get your idjvu?
scotty1024 11-01-2006, 09:38 PM idjvu is up on the MR project site. I've included the er_registry.txt snippet to activate it.
I was just happy to get it to link, run and display today. No panning, no zooming, and for now it always goes to page 1 on startup.
Things are still a bit rough with contentLister. It doesn't make you a manifest.xml, which is why I'm forcing the page to 1. And the icon is the X file icon but if you click on it idjvu will launch.
Please edit your /mnt/settings/er_registry.txt very carefully!
The idjvu application won't brick your iLiad but installing the settings into er_registry.txt could. Please make sure you have your life line shell ready to go.
Let's please be careful out there.
Mike Kostousov 11-01-2006, 10:25 PM Scotty, thanks! Very good job. I was doing idjvu also, but stoped after you published screenshots :) On holidays I can help you with code, if you upload sources. Now, it works very good. djvu - is good format, and some times it is better to have djvu instead pdf, because some of pdf is really complisert and takes very much time to render.
scotty1024 11-01-2006, 11:32 PM This is the 3rd re-write from ipdf scratch and I did it quickly to see if I could get it to link. I need to go back through the code and rename everything to DJVU and turn the pan and rotate code back on. I'll post the source after that.
In the mean time enjoy the binary. It has extra speed from direct writes to /dev/fb0, by passing the X server entirely.
arivero 11-02-2006, 08:27 AM In the mean time enjoy the binary. It has extra speed from direct writes to /dev/fb0, by passing the X server entirely.
Aggh!
Antartica 11-02-2006, 09:15 AM Many thanks to Antartica for his patience with me in getting his tool chain setup. He helped make this possible.
Thanks for the compliments. But it's always a honour to assist a hard-worker as you ;-).
Good job :-D
arivero 11-02-2006, 11:42 AM Scotty, where can I get your idjvu?
http://projects.mobileread.com/iliad/projects/idjvu/
scotty1024 11-02-2006, 02:31 PM I heard back from iRex regarding hooking idjvu into ContentLister.
ContentLister is hard coded internally. :(
So I need to extend idjvu to do the manifest.xml creation trick. Nothing at all I can do about the icon ContentLister shows but on the bright side, at least ContentLister launches idjvu even if it doesn't know what it is. :)
Another good piece of news, I've compiled Poppler and it comes out reasonably close in size to iRex's.
I've gotten zero cooperation out of iRex on Poppler so I'm out on a limb on this one.
I've identified the slow Jack Rabbit Benchmark performance as being a bit of code in Poppler with a note hanging from it saying something similar to: "Please don't make me optimize this, let's use libtiff instead..."
I've compiled libtiff and I'm looking at how many of its nicely written decoders I can hook into Poppler to enhance it.
Antartica's tool chain with scratchbox rulez! Highly recommended update over iRex's tool chain.
scotty1024 11-03-2006, 10:41 AM It is my unhappy task to let you know that I've decided to kill idjvu.
ContentLister simply isn't setup to support it and I'm not going to re-invent the wheel to do all the stuff ContentLister is doing to create the manifest.xml.
So what I am going to be doing this weekend is re-factoring ipdf.
I'm going to make ipdf into a pluggable framework into which viewers for other file formats can be installed, and leverage ipdf as the UI for paging, rotating, zooming, and getting manifest.xml's built via ContentLister. :)
My plan is to release 3 viewers with the new ipdf.
1. wrapper for Poppler e.g PDF support
2. wrapper for DJVULibre e.g. DJVU support
3. wrapper for my RTF parser e.g. Baen RTF ebook support (and yes, I'll still be doing the read direct from ZIP trick.)
The ipdf will use direct to screen memory page transfers with an X window popup place holder for it (so X doesn't get confused.) It will have a full 8 bit path for crisp text.
Support for improved decoding time and error dispersion of images will be in the next release of the Poppler wrapper (sorry, only so many hours this weekend.)
nekokami 11-03-2006, 01:05 PM Scotty1024, have you considered dotReader (http://www.dotreader.com/site/?q=node/70)? Seems like a perfect match of hw and sw functionality to me, but the team there needs someone with your expertise to get around the obstacles iRex has thrown up.
CommanderROR 11-03-2006, 01:41 PM yep...pretty good idea actually...
I should have thought of that...:-)
Are the sources of dotreader available? And is there a way to integrate it into the Iliad more or less seamlessly? It appears there were some problems with ContentLister being hardcoded or something...
scotty1024 11-03-2006, 02:18 PM I'm solving those hard coding issues by exploiting ipdf to handle multiple formats. :D
Dotreader, I'll take a look.
scotty1024 11-03-2006, 02:36 PM OK I registered and posted. They have their source code tucked away somewhere so I wasn't able to grab it.
Maybe they'll respond today. From the luke warm reaction I got to idjvu I suspect that if I substitute dotReader for djvu this weekend there won't be too big a hew and cry (especially since you all still have idjvu...)
CommanderROR 11-03-2006, 03:15 PM take it easy scotty...don't work yourself to death over this...:-)
I posted on the teleblog to get David's attention, so I guess we''ll at least get some feedback from there...
davidrothman 11-03-2006, 04:14 PM Jon Noring and I at OpenReader love the idea! We've forwarded this excellent suggestion to Mark Carey at OSoft. What's more, we'd love for you guys to do open source creation tools or encourage this among other open source folks. The same tools should be able to produce other mobile-friendly formats besides OpenReader. Once documents are in high-quality XHTML 1.1, required for OpenReader, it's downhill to the other formats. The cool thing about OpenReader, however, is that it'll allow greater interactivity. Here's to community! - David - dr@teleread.org / 703-370-6540
scotty1024 11-03-2006, 04:46 PM My Wife is busy this weekend, so I have extra time. :)
Cool! Good news, I realy like to see openreader on the iLiad :) .
Jon Noring 11-03-2006, 05:52 PM As one of the co-founders of the OpenReader Consortium (http://www.openreader.org/), I have little to add to David Rothman's comment.
Since I am leading the development of the OpenReader Publication Format specification (http://www.openreader.org/spec/), technical questions regarding the use of OpenReader in the dotReader, and how to author OpenReader Publications, should be directed to me at jon@noring.name (mailto:jon@noring.name) . I can be reached by Skype (sometimes) at 'jon_noring', and by phone at 801-253-4037.
Besides a port of dotReader to the iLiad, I am also excited about the prospect of building an ebook authoring application (or plug-in) for simpler publications, which allows (almost) pushbutton exporting of the master into a variety of ebook formats including OpenReader, and do so at high quality. I have outlined my thoughts and initial requirements for this tool in a series of three articles posted to The eBook Community (http://groups.yahoo.com/group/ebook-community). Here's the series:
Overview (http://groups.yahoo.com/group/ebook-community/message/26923)
For Publishers (http://groups.yahoo.com/group/ebook-community/message/26924)
For Developers (http://groups.yahoo.com/group/ebook-community/message/26925)
I realize this forum is not be the best place at MobileRead to air the idea of the ebook authoring tool, but if anyone here is interested in pursuing this with us, let me know!
nekokami 11-05-2006, 01:33 PM Excellent. It seemed to me that the E Ink display, wireless and wired connections, and pen input of the iLiad would make it ideal for dotReader, but I was hoping some others would agree! :)
|