02-22-2013, 02:41 PM | #496 |
Resident Curmudgeon
Posts: 75,860
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is it just a problem when Word's filtered HTML is used as the source?
Word's filtered HTML is crap and needs to be cleaned up if you plan on feeding it to Kindlegen as is. That could possibly be the problem. |
02-22-2013, 03:17 PM | #497 |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
|
02-22-2013, 05:49 PM | #498 |
Resident Curmudgeon
Posts: 75,860
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
02-22-2013, 06:41 PM | #499 |
Grand Sorcerer
Posts: 27,900
Karma: 198131398
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
|
02-22-2013, 08:25 PM | #500 |
Resident Curmudgeon
Posts: 75,860
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
What about trying the stand alone splitter to separate the source, KF8 and Mobi? If that works, then it's most likely something in the newer code.
|
02-22-2013, 08:41 PM | #501 |
Sigil Developer
Posts: 8,094
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi,
Thank you very much for the testcase. There are two differences that I can see: 1. The exth_flags now have value 0x08D0 instead of the more normal 0x0850 for the Mobi 7 part. I have never seen that 0x0080 flag bit set. I am wondering what this new flag means. Given how simple this test case is (no fonts, no images, no anything really) it really could just be that the source zip and build log are included in the Mobi 7 part. Interestingly, the Mobi8 part exth_flags do not have this flag bit set. So it is indicating something for only the Mobi 7 part and there really isn't that much different between the two versions. 2. There is a new metadata item 534 which seems to be the string 'kpr' which for some reason I thought meant kindle print replica. I can not figure out why that metadata item is present. And what 'kpr' means. I can even find it in the build_log that is stored inside the test case. Anyone know what 'kpr' stands for since it is obviously not a 'kindle print replica' in this case? Of course it could be none of these differences, and we may need to start removing the Metadata 121 item (the Boundary Section value) in the split Mobi 7 part instead of just setting it to 0xffffffff as we did earlier. Hmm ... I seem to be having trouble getting KindlePreviewer 2.8 for Mac downloaded. Once I get it I will try changing each of these issues in the split code one by one to see if it is the metadata values or the extra 0x0080 flag in the Mobi 7 exth_flags part that is the problem. I will let you know what I find out. KevinH |
02-22-2013, 09:59 PM | #502 |
Sigil Developer
Posts: 8,094
Karma: 5450184
Join Date: Nov 2009
Device: many
|
solution
Hi,
It actually had nothing to do with Metadata 121 (the Boundary), MetaData 534 (the new 'kpr') and nothing to do with the new 0x0080 bit in exth_flags. It was actually the exth_flags 0x0800 bit that seems to indicate that the shared resources in a combo mobi are stored in this header. We never bothered to remove it when we split the combo mobis because it never bothered anything and we were never 100% sure of its meaning. Now it does matter for KindlePreviewer 2.8. So we need to zero out bit 0x0800 in the exth_flags in the split mobi to say there are no longer any shared resources (images, etc) in the mobi 7 part of the file. I have modified mobi_split.py to reflect this change and have uploaded it as mobi_split.py.zip. Please download this and use it to replace the older mobi_split.py file in the KindleUnpack_V61/lib/ directory. Then give it a try and let me know if your troubles go away. If so, we will add it for the next release of KindleUnpack. Thanks for your bug report and especially the test case. KevinH Last edited by KevinH; 02-22-2013 at 10:00 PM. Reason: fixed typos |
02-22-2013, 10:12 PM | #503 |
Resident Curmudgeon
Posts: 75,860
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
If the new mobi_split.py works, can I just replace the file of the same name in the KindleUnpack plugin for Calibre?
|
02-22-2013, 10:31 PM | #504 |
Sigil Developer
Posts: 8,094
Karma: 5450184
Join Date: Nov 2009
Device: many
|
|
02-22-2013, 10:36 PM | #505 |
Resident Curmudgeon
Posts: 75,860
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
02-22-2013, 11:54 PM | #506 | |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Quote:
Replacing the mobi_split.py file with the new version did the trick! Thank you so much for fixing this problem. Now Kindle Previewer 2.8 is happily eating up Mobi7 split .mobi files (Mobi8 files too). I tested both Word-generated and clean XHTML source files (full-featured Kindle books). Cheers |
|
02-23-2013, 12:16 AM | #507 |
Sigil Developer
Posts: 8,094
Karma: 5450184
Join Date: Nov 2009
Device: many
|
Hi,
Glad it works, We will include it in the next upcoming release but that may take a while since it is the only fix or change I know about so far. Paul and DiapDealer is this fix enough for a new release or should we wait for other bug fixes or improvements? If so, do either of you have any other changes you want to incorporate? Thanks, KevinH |
02-24-2013, 08:32 AM | #508 | |
Enthusiast
Posts: 32
Karma: 10
Join Date: Jun 2012
Device: Kindle 4 NT (broke), Kindle Paperwhite, Kindle 2
|
Quote:
that's OK, I included the link to your post with the patch and instructions in my tutorial. Thanks to KindleUnpack, my tutorial now has foolproof instructions on removing embedded fonts from Word-generated Kindle books. Cheers Last edited by steppe; 02-24-2013 at 08:34 AM. |
|
02-24-2013, 09:32 AM | #509 | |
Grand Sorcerer
Posts: 27,900
Karma: 198131398
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
I'm torn on whether it warrants an update on its own, though. On the one hand: the splitter feature exists solely for the purpose of splitting files created by Kindlegen/Previewer (and 2.8 is only going to become more and more common). On the other hand: how many people are really splitting kindlegen produced files? I'm OK either way, but I would guess the vast majority of users are only interested in the unpacking portion of the tool (not to say other uses aren't important). |
|
03-13-2013, 05:21 AM | #510 |
Enthusiast
Posts: 42
Karma: 11050
Join Date: Nov 2009
Device: Kindle Paperwhite, Kindle Touch, Kindle 2
|
So I actually decided to try the splitting feature, to see how much space it would save on a Kindle loaded with converted ePub books. The answer turned out to be about 11.5% on my corpus of 1277 books. But that's not what this post is about…
I compared a KF8 stripped by KindleUnpack with one generated from the same original file by Amazon's Personal Document Service, and found that, aside from some minor changes in the metadata (including addition of the atv:kin:1 tag that they harvest and upload to track documents), it does something different with DATP sections near the end of the document. There are two in the original file and the KindleUnpack KF8, but one is removed in the Amazon KF8, and it's put in a slightly different location in the file. I wonder whether this matters. Do you have any idea what this section is for? It looks like a table of offsets. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can i rotate text and insert images in Mobi and EPUB? | JanGLi | Kindle Formats | 5 | 02-02-2013 04:16 PM |
PDF to Mobi with text and images | pocketsprocket | Kindle Formats | 7 | 05-21-2012 07:06 AM |
Mobi files - images | DWC | Introduce Yourself | 5 | 07-06-2011 01:43 AM |
pdf to mobi... creating images rather than text | Dumhed | Calibre | 5 | 11-06-2010 12:08 PM |
Transfer of images on text files | anirudh215 | 2 | 06-22-2009 09:28 AM |