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 10-31-2009, 03:01 PM   #1
seth123abc
Junior Member
seth123abc began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-505
HTML file added to library is truncated unexpectedly

The file contained in the .zip when added to the library is only 42k when the original is 382k. Opening the file reveals the following at the end, where it is cut off:
Code:
remained
shut.
<dd>"</dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></dd></body>
</html>
The original file uses the 'dd' tag for paragraphs, but does not close them. The </dd> must have been added by calibre when the file was added to the library. I can only guess that calibre expects the <dd> to be closed and therefore adds all of those </dd>, and the file is truncated perhaps because it thinks all of those tags are being chained and there is some sort of limit preventing it from adding the entire file? In any case the original file opens and views perfectly in any web browser. I am not really sure what exactly is going on here, perhaps someone here will be able to explain/fix.
seth123abc is offline   Reply With Quote
Old 10-31-2009, 03:21 PM   #2
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
The <dd> tag is used to describe an item in a definition list - not paragraphs. Remove them from the source file. Web browsers are used to handling crappy code and try to work around it by ignoring/fixing as best they can; conversion tools do not have this luxury.
acidzebra is offline   Reply With Quote
 
Enthusiast
Old 10-31-2009, 03:52 PM   #3
seth123abc
Junior Member
seth123abc began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2009
Device: Sony PRS-505
But the <dd> tag is actually needed to properly indent and separate the paragraphs -- removing them lumps everything together. Regardless of what the tag is originally intended for, it does serve a necessary purpose here.

I did find that replacing them all with <p>, while adding unneccessary blank lines when viewed with a web browser, is converted by calibre into a properly formatted lrf, which is an acceptable workaround for me.
seth123abc is offline   Reply With Quote
Old 10-31-2009, 03:57 PM   #4
acidzebra
Liseuse Lover
acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.acidzebra ought to be getting tired of karma fortunes by now.
 
acidzebra's Avatar
 
Posts: 869
Karma: 1035404
Join Date: Jul 2008
Location: Netherlands
Device: PRS-505
Quote:
Originally Posted by seth123abc View Post
Regardless of what the tag is originally intended for, it does serve a necessary purpose here.
Not "originally intended for" - intended for, period. Abusing a tag will lead to things breaking down, as you have just noticed.

You can style the p tag to behave in the same fashion by manipulating the margin/padding attributes in CSS; this way it will render consistently, be compliant, and behave in the fashion you want.
acidzebra 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
Merging multiple HTML files into one HTML file skoobwoman Workshop 45 07-11-2014 10:46 AM
Truncated file crutledge Sigil 11 09-13-2010 03:37 PM
my library in a html file Brandobras Onyx Boox 7 08-20-2010 02:45 AM
BOOKS ADDED to KOBO DO NOT SHOW UP ON LIBRARY AND ÏM READING cancan Kobo Reader 8 07-11-2010 05:26 AM
Chicago Public Library Added No Books in August! Sydney's Mom News 21 09-04-2009 02:15 PM


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


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