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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-04-2011, 05:49 PM   #1
khromov
Connoisseur
khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 499152
Join Date: Jul 2011
Device: Kindle
Problem with html -> Mobi conversion - html tags visible.

I am having some trouble using .html (zip) -> .mobi conversion.

As soon as I enable post-processing (and check any of the alternatives) my resulting mobi loses all formatting and outputs html tags in cleartext (see picture below)


This is happening consistently with multiple html files, Calibre 0.8.12 on Win7.

I apologize if I posted this in the incorrect section.

Edit: also, my heading is wrong. It's supposed to be html -> mobi and nothing else.

Moderator Notice
Fixed title per your request

Last edited by theducks; 08-04-2011 at 08:31 PM.
khromov is offline   Reply With Quote
Old 08-04-2011, 06:51 PM   #2
jackie_w
Wizard
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 2,798
Karma: 4193095
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
Without access to the .zip file it's hard to say, but that <pre> tag on line 2 is suspicious. Where is its matching </pre> tag?

<pre> tags normally mean 'show this text as-is' i.e. you wouldn't expect to see <b> and <i> tags inside <pre>...</pre> tags.
jackie_w is offline   Reply With Quote
Old 08-04-2011, 08:33 PM   #3
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,699
Karma: 5643643
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by zapt0 View Post
I am having some trouble using .html (zip) -> .mobi conversion.

As soon as I enable post-processing (and check any of the alternatives) my resulting mobi loses all formatting and outputs html tags in cleartext (see picture below)


This is happening consistently with multiple html files, Calibre 0.8.12 on Win7.

I apologize if I posted this in the incorrect section.

I would guess yo have another <pre> tag before the empty <p> tags
theducks is offline   Reply With Quote
Old 08-04-2011, 08:46 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,278
Karma: 18149666
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Try turning off post-processing. I don't use it and don't have these problems.
JSWolf is offline   Reply With Quote
Old 08-05-2011, 08:21 AM   #5
khromov
Connoisseur
khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 499152
Join Date: Jul 2011
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
Try turning off post-processing. I don't use it and don't have these problems.
I need post-processing due to the layout film scripts have so they fit onto an ebook reader.

Quote:
Originally Posted by theducks View Post
I would guess yo have another <pre> tag before the empty <p> tags
Actually I don't.

Besides, <pre> tags are only for keeping spaces and line breaks as they are in the HTML (and Calibre should probably remove the pre tags when you perform unwrapping.)
See:
http://www.w3schools.com/tags/tag_pre.asp
khromov is offline   Reply With Quote
Old 08-05-2011, 02:05 PM   #6
theducks
Grand Sorcerer
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 14,699
Karma: 5643643
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by zapt0 View Post

Besides, <pre> tags are only for keeping spaces and line breaks as they are in the HTML (and Calibre should probably remove the pre tags when you perform unwrapping.)
See:
http://www.w3schools.com/tags/tag_pre.asp
Your screen shot is showing a rendering of the book.
What is in the CODE?
Perhaps:
Code:
<pre>    << this one will not show in the book view
<p></p>
<pre>...

</pre>   << this one will not show in the book either
</html>
</body>

I have used Pre tags before
theducks is offline   Reply With Quote
Old 08-05-2011, 02:09 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,278
Karma: 18149666
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
One thing is don't use <pre> tags. On most readers, they don't work properly because if they are too wide for the screen, there's no way to scroll left/right to see what's off the screen. Convert <pre> into <div>.
JSWolf is offline   Reply With Quote
Old 08-05-2011, 02:10 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 37,278
Karma: 18149666
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by zapt0 View Post
I need post-processing due to the layout film scripts have so they fit onto an ebook reader.
But have you tried without post processing just to see what happens?
JSWolf is offline   Reply With Quote
Old 08-05-2011, 04:30 PM   #9
khromov
Connoisseur
khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.khromov ought to be getting tired of karma fortunes by now.
 
Posts: 82
Karma: 499152
Join Date: Jul 2011
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
But have you tried without post processing just to see what happens?
Yes, the book is rendered without this problem if post processing is disabled, however, the book is rendered poorly thanks to the formatting being optimized for view on a screen, therefore I need to use post processing to make it work well on an e-reader.

Since this is happening over multiple tested html files, regarding of whether the <pre> tag is actually to blame I think the issue needs to be looked over to see if there is a problem with BeautifulSoup or other internal component of Calibre.

As for posting the actual file, I'm not sure if it would be allowed under site rules, but you can simply try saving this page as a html file and import it into Calibre to recreate the issue:
http://www.imsdb.com/scripts/Gattaca.html
(Convert html -> mobi and enable any of the post-processing options to recreate issue.)
khromov is offline   Reply With Quote
Old 08-06-2011, 11:25 AM   #10
dwig
Guru
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 971
Karma: 1382338
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Dell Venue 8 Pro, Kindle 3/WiFi - Retired:Clie UX50, T415, ...
You should NOT rely on Calibre's ebook viewer to preview/test an ebook conversion, particularly MOBI conversions.

To properly preview/text a MOBI file you should use either a Kindle device or the Kindle Previewer. The latter is a special software viewer that is designed to replicate the display on the device. The current version can replicate the K3, KDXG, Kindle for iPob, & Kindle for iPhone and is available free from this page:

http://www.amazon.com/gp/feature.htm...cId=1000234621

Also, the <PRE>...</PRE> tag set specifies that all contents are pre-formatted. You can't reliably include any other HTML formatting tags inside of <PRE> section. When you do, they should be displayed by the browser/reader/viewer.
dwig 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
.Txt -> .Html -> .Zip Problem galagable Conversion 7 04-30-2011 06:05 AM
Convert HTML to MOBI (HTML recognized as ZIP file) pdubois Conversion 1 01-25-2011 12:55 PM
problem with Office 2011 generated-html to zip selmat Conversion 4 01-23-2011 06:13 PM
HTML Conversion Problem bigtymer Calibre 7 01-14-2010 08:15 PM
Multiple html (zip) conversion no longer works Katelyn Calibre 4 08-07-2009 11:52 AM


All times are GMT -4. The time now is 08:40 AM.


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