04-02-2009, 11:22 AM | #166 | |
Wizard
Posts: 3,442
Karma: 300001
Join Date: Sep 2006
Location: Belgium
Device: PRS-500/505/700, Kindle, Cybook Gen3, Words Gear
|
Quote:
Code:
uint8_t get_local_key(int streamlen, uint8_t key) { if ( key && key <= 0xF0u ) return streamlen % key + 0xF; else return 0; } |
|
04-03-2009, 10:24 AM | #167 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
I've testing the algorithm and this is working right now for me: Code:
BYTE keybyte; declen = LengthOfStream keybyte = (declen % (PsuedoEncryptionKeyByte&0xFF)) + 0x0F; if ((type == 0x11)||(type == 0x19)||(type == 0x17)) { if (declen > 0x400) declen = 0x400; } for (i = 0; i < declen; i++) { *(p + i) ^= keybyte; } but -480&0xFF = 32, that`s the correct module for declen. |
|
Advert | |
|
04-03-2009, 12:52 PM | #168 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
I've performed some changes to lrf conversion as you can see: I'm going to upload this new version right now. |
|
04-03-2009, 01:51 PM | #169 |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
New Version v0.9.204
Finally I've found correct way to descrambling streams in LRF, including images; and also I've corrected many bugs regarding text flow.
@RandallFlag: thanks for the examples @igorsk:thanks for your info. Enjoy, Eladio |
04-03-2009, 02:34 PM | #170 |
Hey Trashcan Man
Posts: 66
Karma: 658
Join Date: Jan 2008
Location: So Cal
Device: Nook color, prs 505, Axim x30, psp, Acer Aspire One [running xp]
|
Thanks for all your hard work. I'm downloading it now and will try it out in a bit.
|
Advert | |
|
04-03-2009, 03:11 PM | #171 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Your hard work is truly admirable. Keep up the good work! A bit of karma coming your way.... |
|
04-03-2009, 03:59 PM | #172 |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Bad luck... this exception is thrown in pdfbox library and stops execution. It cannot recognize some ColorMaps and i can not catch Exception and continue, so we must wait for pdfbox boys to found correct maps for some images.
|
04-07-2009, 10:54 AM | #173 |
Junior Member
Posts: 1
Karma: 10
Join Date: Apr 2009
Device: itouch
|
lrf won't convert, NegativeArraySize exception
I get the following trying to convert several books from LRF to EPUB with ver 204.
java.lang.NegativeArraySizeException at lrf.objects.Book.getMetaData(Book.java:228) at lrf.objects.Book.<init>(Book.java:113) at lrf.RecurseDirs.convertAction(RecurseDirs.java:515 ) at lrf.RecurseDirs.convertActionParams(RecurseDirs.ja va:342) at lrf.RecurseDirs.<init>(RecurseDirs.java:88) at lrf.RecurseDirs.main(RecurseDirs.java:40) Have successfully converted many other books (on a Mac). But a few won't convert. I also have one book that gets the following exception: java.lang.IndexOutOfBoundsException at java.nio.Buffer.checkIndex(Buffer.java:520) at java.nio.DirectByteBuffer.getInt(DirectByteBuffer. java:648) at lrf.buffer.MappedReader.getInt(MappedReader.java:7 0) at lrf.objects.Book.loadObjects(Book.java:342) at lrf.objects.Book.<init>(Book.java:115) at lrf.RecurseDirs.convertAction(RecurseDirs.java:515 ) at lrf.RecurseDirs.convertActionParams(RecurseDirs.ja va:342) at lrf.RecurseDirs.<init>(RecurseDirs.java:88) at lrf.RecurseDirs.main(RecurseDirs.java:40) It might be possible the files are corrupt as I don't have another method to test their correctness. Also, many (most? all?) conversions end up with Unknown as author and title and no cover art. Great set of tools. Any help appreciated. Thanks. |
04-07-2009, 11:55 AM | #174 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
Eladio. |
|
04-28-2009, 04:37 PM | #175 |
Connoisseur
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
|
How to make this tool works with Chinese?
I convert some Chinese LRF to PDF but all text gone. I guess it is because Chinese font is not referenced? Thanks. |
04-29-2009, 03:46 AM | #176 |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
|
04-29-2009, 03:58 PM | #177 |
Connoisseur
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
|
One more suggestion - maybe I just do not know how to use it.
When convert to HTML, All of images are name as 1.jpg, 2.jpg.... Can you change it to something like: 00001.jpg, 00002.jpg .... 011011.jpg. The reason I ask this is because I use this tool to convert comics. DR1000 can display jpg directly but the files sort order got problem. Thanks. |
04-29-2009, 05:36 PM | #178 | |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Quote:
|
|
04-30-2009, 06:24 AM | #179 |
Xtreme Quijote
Posts: 101
Karma: 208
Join Date: Sep 2008
Location: La Mancha, Spain
Device: Sony PRS-505
|
Please try to convert to html (-html option) and review transformed doc: Has sense to you? I think chinese font must be embedded on pdf...
|
04-30-2009, 11:01 AM | #180 |
Connoisseur
Posts: 96
Karma: 14
Join Date: Mar 2009
Device: Kindle DX, PocketBook 360
|
HTML works but:
1. Image reference got problem. 2. Random crash about index outbound Or you can add one more param to let me give you what base font I installed for Chinese? Then you can use the font I papered to create PDF. For example: -basefont "/usr/share/fonts/ttf/ fc-cache/msyh.ttf" You can just create all font like: BaseFont.createFont("/usr/share/fonts/ttf/ fc-cache/msyh.ttf", BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED); Thanks Last edited by alxwang; 04-30-2009 at 11:45 AM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
A real PDF to epub/djvu/rtf/html software?. | DsOft | ePub | 35 | 01-02-2011 03:57 PM |
PRS-700 Unable to convert pdf to other formats (epub/rtf/doc) | testndtv | Sony Reader | 1 | 09-24-2010 01:45 PM |
How to create non-embedded Unicode EPUB,LRF,TXT,RTF,PDF | alexmobile | Sony Reader | 1 | 09-23-2009 10:04 PM |
Calibre PDF conversions - LRF/EPUB vs RTF | jackie_w | Calibre | 14 | 09-22-2009 03:06 PM |
[Old Thread] unable to convert ebooks(rtf, txt,lit,html,pdf) to lrf in calibre .4.131 | jackdeth191 | Calibre | 9 | 05-02-2009 02:55 AM |