11-10-2008, 08:32 PM | #271 | |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
Quote:
Unfortunately, unzipping/edit rezipping isn't working. After the rezip the epub is reported as invalid. I seem to remember that the files have to be zipped in a particular order? Recombining the component html files and hitting them with html2epub works though. |
|
11-10-2008, 10:22 PM | #272 | |
Connoisseur
Posts: 57
Karma: 10
Join Date: Oct 2008
Device: prs 505
|
Quote:
|
|
Advert | |
|
11-11-2008, 12:02 AM | #273 |
Guru
Posts: 780
Karma: 1416
Join Date: Jan 2008
Device: Kobo Clara 2E/HD, Kindle PW
|
Um, I did
The first thing I tried was unzipping the epub doing the s/r on the html files then rezipping. When that didn't work I unzipped the file(s) did my s/r then ran any2epub against the recombined html, re-creating the book. All is well. |
11-13-2008, 12:22 AM | #274 |
Connoisseur
Posts: 57
Karma: 10
Join Date: Oct 2008
Device: prs 505
|
There should be a '<?xml version="1.0" encoding="UTF-8"?>' in metadata.opf.
Without this line, reader and epub-meta will parse the book title with wrong encoding some time. |
11-13-2008, 04:04 AM | #275 | |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
I dont see why, utf-8 is the default encoding for XML files and calibre always creates them in that encoding. |
|
Advert | |
|
11-14-2008, 09:32 AM | #276 | |
Connoisseur
Posts: 57
Karma: 10
Join Date: Oct 2008
Device: prs 505
|
Quote:
Most book I had converted are good, but there're 2 or 3 books which book title is incorrect displayed by 505 and the epub-meta. The titles have utf-8 encoding, but it seems that epub-meta treat the title as a sequence of ascii bytes, and re-encode each byte into utf-8. e.g. I have a book title '中文版', which utf-8 encoding is e4 b8 ad e6 96 87 e7 89 88, but the result is epub-meta is 'ä¸*ćç', which is c3 a4 c2 b8 c2 ad c4 87 c3 a7. I have check the metadata.opf, it's correctly encoded with utf-8. After adding the UTF-8 declaration line to metadata.opf, both 505 and epub-meta display the title correctly. btw, without the UTF-8 line, 'epub-meta test.epub' display the wrong title to the console. 'epub-meta test.epub > file' reports a error: Traceback (most recent call last): File "/usr/bin/epub-meta", line 8, in <module> load_entry_point('calibre==0.4.104', 'console_scripts', 'epub-meta')() File "/usr/lib/python2.6/site-packages/calibre/ebooks/metadata/epub.py", line 238, in main print unicode(get_metadata(stream, extract_cover=False)) UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-19: ordinal not in range(128) |
|
11-14-2008, 12:06 PM | #277 | |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
OK I've added the encoding declaration
Quote:
|
|
11-20-2008, 01:45 PM | #278 |
Wizard
Posts: 3,671
Karma: 12205348
Join Date: Mar 2008
Device: Galaxy S, Nook w/CM7
|
Hi kovidgoyal,
I just summitted a Ticket #1287 with the generation of ePUB. It seems any style sheet that has a number as part of the name is not ported over to the final CSS in the ePUB file. I've attached the original HTML (crated from BookCreator) the final ePUB product and a sample LRF(which does handle the style sheets correctly) =X= |
11-28-2008, 10:15 AM | #279 |
Enthusiast
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
|
epub file causes a crash in both DE and PRS 700
I don't know where to start on this problem so I'm just going to bring it up and go from there.
I've got a book in CHM format that I obtained to replace the pulp version I've got. I decompress it on my Mac 10.5 box and then give the table of contents to html2epub and it converts it for me. However, loading the file into Adobe Digital Editions or the PRS 700 causes a crash. Can someone give me a pointer on how to retrieve some better debugging information for this problem? |
11-28-2008, 02:08 PM | #280 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Unfortunately, there isn't one. DE doesn't seem to have a "debug" mode. In these situations what I usually do is test the epub file part by part (i.e. remove all the parts and add them back one by one) to try to localize what is causing the problem. Another useful tool is epubcheck.
|
11-28-2008, 04:36 PM | #281 |
Enthusiast
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
|
Too bad Thanks for the info, though... it forced me to dig into the HTML and read it through. The problem came down to horrid HTML with unmatched table tags, and td tags. I assume this was probably blowing the HTML parser's stack to hell.
I fixed one file, though... I don't relish running around fixing a ton of them, as I think there are a lot that have bad HTML in them. I'll have to find a magic program to fix this stuff up - I also don't relish writing one of those... one must exist somewhere. Thanks again |
11-28-2008, 04:43 PM | #282 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
htmltidy might do the trick
|
11-28-2008, 04:48 PM | #283 |
Enthusiast
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
|
I'll take a look at that.
Now that the device doesn't crash, however, I see something new. There are 3 pages in that are generated but they all get shown together (page 1-3 of 3). The problem is that what's actually shown is only the top part of what I would see in Safari. The bottom part is cut off (say the last half to two thirds of the text) and scrolling forward and backward takes me to blank pages. I read through this thread, but I may have missed this issue and/or its workaround. Is this a known issue with an easy answer already? |
11-28-2008, 05:39 PM | #284 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Never seen that issue. Does it act that way in calibre's epub viewer as well?
|
11-28-2008, 08:47 PM | #285 |
Enthusiast
Posts: 47
Karma: 90
Join Date: Nov 2008
Device: Sony PRS-700
|
The doc in the PRS700 does the issue that I already described (page is cut off at the bottom).
The ebook-viewer has some drawing problems with repeating artifacts all over the place but if I force it to redraw it gets the page properly rendered. Digital Editions chokes on this just like the PRS 700, however. First, it's wicked slow with it, and second pages render the same way... One page with text cut off at the bottom and an attempt to scroll down switches to the next page, which is blank. I've noticed that most of the pages' entire content is in a table, like this: Code:
<table> <tr> <td> ... whole bunch of HTML text ... </td> </tr> </table> |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] Epub Output: Line Height | greenapple | Conversion | 20 | 01-27-2013 09:27 AM |
EPUB output justification | toki08 | Calibre | 10 | 01-08-2011 04:14 PM |
Calibre epub output details and Nook | squidward | Calibre | 6 | 11-24-2010 03:21 PM |
epub output metadata | troymc | Calibre | 5 | 05-22-2010 12:23 AM |
Problem with epub output in Cybook Gen3 | fjf | Calibre | 3 | 02-03-2010 02:23 AM |