10-10-2010, 07:15 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Problem Converting .lit to anything
Hi
I have searched this forum and although I have found problems similar to mine, I have not found a match. I'm new to Calibre so excuse me if I am making a stupid error somewhere. I have acquired a bunch of books in .lit format and I need to read them on my Sony PRS-505. When I convert them using the default settings, I get output files which can be read perfectly using Calibre's preview fuction but when loaded onto my reader, the files show the first 8 pages, part of the ninth and all further pages are blank. This is the case for output as ePub, txt, and PDF. I have tried debug and each of the .HTM intermediate files look fine. Also, Adobe reader can read the PDFs without issue on the computer. Does anyone know of this issue and a means of correcting the problem? Many thanks. |
10-10-2010, 08:44 AM | #2 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Have you opened the HTML from debug (probably the Input sub-dir) in a text editor. You need to home in on the section where the discontinuity occurs. Are there any non-standard chars there? Or can you post the relevant section of the HTML so we can get a better look?
|
Advert | |
|
10-10-2010, 08:46 AM | #3 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
if you convert your LIT to ePub, maybe you can post the relevant bits here for us to have a look at. As for PDF, pretend it doesn't exist. Life will be better off.
|
10-10-2010, 09:51 AM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Hi
Thanks for your replies! I have examined the .HTM files in the debug output and there are no strange characters or tags in the vicinity of 'broken' pages. I also mis-described the problem - what I said was correct for PDF and TXT files but ePub files show nothing but the Calibre logo on page one and nothing thereafter. The reader reports the correct number of pages but they are blank. Two other clues I noticed 1. The reader indicates it is displaying multiple pages at all times, always two or more even when set to maximum display size. 2. Calibre can preview the ePub file but Sony Reader Library cannot. It behaves like the reader itself. Which might be the most relevant bit of the intermediate .HTm file to post? It's a bit big to post the lot! Thanks again. |
10-10-2010, 10:40 AM | #5 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Try a couple of pages either side of the cut-off point. Zip up the html into a zip file and attach that.
If that doesn't show us anything I'll be happy to work with you directly if you want to PM me an email address. (Then you can send the whole LIT without breaking any forum Copyright rules.) Last edited by jackie_w; 10-10-2010 at 10:44 AM. |
Advert | |
|
10-10-2010, 12:06 PM | #6 | ||
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Thank you.
This is the area containing the 'cut-off'. The break occurs where the asterisks are - THESE HAVE BEEN INSERTED BY ME FOR GUIDANCE AND ARE NOT PART OF THE ORIGINAL HTML! Quote:
Quote:
o would be most grateful if you could take a look at the whole file for me if the above does not shed any light. Thanks. |
||
10-10-2010, 12:34 PM | #7 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I don't know whether this is causing the problem, but I don't see any paragraph breaks, just hard line breaks. Also I don't recognise the tag </br>.
As far as I know the correct tag for linebreak in XHTML is <br />. It doesn't have a matching closing tag. Try opening the HTML file in a good text editor and replace Code:
every instance of <br class="calibre1"> with <p class="calibre1"> every instance of </br> with </p> If that is no better PM me with your email address and we can take it from there. Edit: Oh and make sure you put the edited HTML file in the same folder as the unedited one so that it has access to the correct CSS file and any images when you import to Calibre. Last edited by jackie_w; 10-10-2010 at 12:40 PM. |
10-10-2010, 01:19 PM | #8 | |
Well trained by Cats
Posts: 29,804
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
|
|
10-10-2010, 01:57 PM | #9 |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
I thought I already said that. However, I was hoping that turning the incorrect linebreaks into proper paragraphs would give Calibre a better chance of being able to split the HTML into pieces for the EPUB. Whether it does remains to be seen.
|
10-10-2010, 02:03 PM | #10 |
Banned
Posts: 1
Karma: 10
Join Date: Oct 2010
Device: none
|
Hey i think that this will definitely helps you....
[link removed by moderation] Last edited by dreams; 10-10-2010 at 09:49 PM. |
10-10-2010, 02:04 PM | #11 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Hi
THANK YOU!!! Replacing the characters in the html worked. Now since I have 140 books to convert, do you think there is any way to fix this 'properly'? I guess I should raise a bug with Calibre and wait for developments? What does the team think. |
10-10-2010, 02:17 PM | #12 |
Wizard
Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
It's unlikely that all 140 lit files would have that problem. I've looked at a lot of lit files and have yet to see one using that formatting.
Go ahead and open a bug as an FR if you want that scenario covered - (preprocessing covers some other badly formatted lit sources), but try some of your other lit files first and make sure that wasn't a one-off. |
10-10-2010, 02:18 PM | #13 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Quote:
Last edited by dreams; 10-10-2010 at 09:47 PM. Reason: link removed by moderation |
|
10-10-2010, 02:25 PM | #14 |
Junior Member
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
|
Just for clarity, what I did was take the first change line of Jackie_W's post, changing <br class *****> to <p class *****> and then took theducks's advice and turned every </br> into <br />.
This is laborious, requiring one dummy conversion, an edit of the HTML and another 'real' conversion, but the final ouptput is perfect. Is conversion from .lit a rarity or are my .lit files perhaps themselves a bit 'off'? I can't believe I am the only person to have this problem. Thanks again to everyone. Edit: Sorry - we are crossing our posts. All 140 files I have show this problem but it is a book collection prepared by the same person at about the same time. Last edited by Global; 10-10-2010 at 02:27 PM. Reason: Synchronise postings. |
10-10-2010, 02:36 PM | #15 | |
Grand Sorcerer
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
|
Quote:
I think the best thing you can do with badly formatted LITs is to strip out the HTML/CSS/Images with Debug then throw away the useless LIT. There must be an infinite number of ways to create "rubbish" HTML before wrapping it up in a format so user-edit-unfriendly as LIT. I know Calibre is brilliant but there must be a limit to how much rubbish Kovid can predict and allow for. Still - you never know... |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem converting LIT | AprilHare | Calibre | 4 | 08-08-2009 08:20 PM |
Problem converting .lit to.lrf | corroonb | Calibre | 0 | 07-25-2009 05:14 AM |
Problem converting LIT to Sony Reader format. | alophind | Sony Reader | 4 | 08-27-2007 11:31 AM |
Converting LIT to LRF Woes (or: Trouble with Images in LIT Files) | JEMelby | Sony Reader | 0 | 07-27-2007 09:18 PM |
Fixing Book Designer problem with italics when converting from LIT | angelyne | Sony Reader | 3 | 07-09-2007 11:32 AM |