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

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-13-2012, 05:34 PM   #1
codrutoctavian
Enthusiast
codrutoctavian began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jul 2009
Location: Bucharest, Romania
Device: Kindle 3
epub to mobi using kindlegen - question

I have some books which I am trying to convert to mobi using kindlegen. I have unpacked the epub and modified the content.opf and toc.ncx files and the conversion goes nicely but kindlegen is raising a lot of warnings of the type:

Warning(inputpreprocessor):W29001: inserting implicit <p>
in file: xxxxxxx line: 0000017
Warning(inputpreprocessor):W29001: inserting implicit <p>

but it converts the file eventually with no fatal errors:

nfo(prcgen):I1009: Resolving guide items
Info(prcgen):I1017: Building PRC file, record count: 0000192
Info(prcgen):I1039: Final stats - text compressed to (in % of original size): 041.65%
Info(prcgen):I1041: The file format version is V8
Info(prcgen):I1036: Mobi file built successfully

However in Kindle Previewer the book is formatted nicely as in the original epub only when simulating Kindle Fire. When simulating a generic Kindle the images are not displayed as they should be and unnecessary spaces are introduced. I have checked the html code and it seems that it is using <svg> tags for images. For example:

<p id="d1114115821">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="100%" version="1.1" viewBox="0 0 516 561" width="100%">
<rect fill="#000007" height="561" width="516" x="0" y="0"/>
<image height="561" transform="translate(0 0)" width="516" xlink:href="images/xxxx.jpg"/>
</svg>
</p>

In the Amazon Kindle Guidelines it is mentioned:

3.9.7 HTML Guideline #7: Avoid Using Scripting with SVG Images
Scripting is not supported. All scripts are stripped from the source during conversion. SVG with animation is not supported.

So, my questions are:

1. What about the errors:

Warning(inputpreprocessor):W29001: inserting implicit <p>
in file: xxxxxxx line: 0000017
Warning(inputpreprocessor):W29001: inserting implicit <p>

what do they mean?

2. What to do about the <SVG> tags. Should I rewrite the code? To what?

Thanks
codrutoctavian is offline   Reply With Quote
Old 02-14-2012, 11:06 AM   #2
Whackatagin
Tweaker
Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.Whackatagin ought to be getting tired of karma fortunes by now.
 
Whackatagin's Avatar
 
Posts: 102
Karma: 324366
Join Date: Jan 2012
Location: Scotland
Device: Kindle / KOBO / PC
Try Calibre instead of Kindlegen, seems to handle conversion a little more smoothly. i.e. it is far more tolerant about what you input.

Kindle uses <img tags instead of <SVG. Another common conversion bug with Kindlegen is that it ignores blank lines tagged <br>, do a search and replace with Sigil, use &nbsp; Putting it after the closing </p> will give you a standard font size blank line. Putting it inside <p> tags on a line of its own will give you a nice chapter break sized space. ie <p>&nbsp;</P>

I would try running it through Calibre before you start digging into the code. If it is a well formed epub it should convert without much bother.

Good luck.
Whackatagin is offline   Reply With Quote
 
Enthusiast
Old 02-14-2012, 03:35 PM   #3
codrutoctavian
Enthusiast
codrutoctavian began at the beginning.
 
Posts: 37
Karma: 10
Join Date: Jul 2009
Location: Bucharest, Romania
Device: Kindle 3
Thanks, I will try that. However I don't like Calibre... but I will use it for this task.
codrutoctavian 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
kindlegen epub to mobi error codrutoctavian Kindle Formats 2 02-14-2012 11:40 AM
KindleGen: Epub to Mobi conversion virtual_ink Kindle Formats 21 11-18-2011 08:00 AM
kindlegen epub to mobi - TOC intention level incorrect vogella Kindle Formats 3 11-04-2011 04:02 AM
mobi page # for K3 from NCX with kindlegen? scl Kindle Formats 0 10-30-2011 12:33 PM
kindlegen epub to mobi - lists are incorrectly displayed vogella Kindle Formats 5 10-28-2011 02:53 PM


All times are GMT -4. The time now is 08:26 PM.


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