Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-10-2010, 07:15 AM   #1
Global
Junior Member
Global began at the beginning.
 
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.
Global is offline   Reply With Quote
Old 10-10-2010, 08:44 AM   #2
jackie_w
Grand Sorcerer
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: 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?
jackie_w is offline   Reply With Quote
Advert
Old 10-10-2010, 08:46 AM   #3
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: 73,938
Karma: 128903250
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.
JSWolf is offline   Reply With Quote
Old 10-10-2010, 09:51 AM   #4
Global
Junior Member
Global began at the beginning.
 
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.
Global is offline   Reply With Quote
Old 10-10-2010, 10:40 AM   #5
jackie_w
Grand Sorcerer
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: 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.
jackie_w is offline   Reply With Quote
Advert
Old 10-10-2010, 12:06 PM   #6
Global
Junior Member
Global began at the beginning.
 
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:
</br><br class="calibre1">Natalie Maple decided something right then and there. This was where she wanted to live. This was the life she wanted. What was Arby going to say when she delivered that little piece of news? </br><br class="calibre1">Arby would never move to Bunsen, Mississippi. Not in a million years. </br><br class="calibre1">Natalie smiled. This little town just kept looking better and better. </br><br class="calibre1">ARBY WAS TRYING to explain that arguing with Natalie was like trying to convince a dog not to dig a hole. "I'm very sorry to hear that, sir." The bartender couldn't care less and left. </br><br class="calibre1">"I know just how you feel," said the young man a couple of stools over. "My aunt decided this was the place to go for our family reunion. They're all down the street watching some banjo players." </br><br class="calibre1">"Banjos!" Arby Maple said in disgust. </br><br class="calibre1">The young man went across to the bartender and came back with two drinks, handing one over to Arby. "It's on me." </br><br class="calibre1">"Thanks, friend." Maple accepted it gladly. </br><br class="calibre1">"The modern-day victims of Yee Haw! must stick together," the young man announced and raised his glass in a toast. </br><br class="calibre1">The Scotch whiskey went down all right, but when it was done Arby had some grittiness on his tongue. "You know," his new pal announced, "the worst thing about this place is the people. The people here are very rude." </br><br class="calibre1">"Naw, just the opposite. They're too damn polite," Maple said. "Wait. You know what? You're right. They are rude. They act polite but they're really being rude, right to your face, all the time, and just dressing it up as Southern manners. At least in New York they tell you to your face if they think you're an asshole." </br><br class="calibre1">"Drink up, friend," the young man said. </br><br class="calibre1">Maple drained the Scotch whiskey and tried to swallow the grainy residue on his tongue. "They can't even wash a glass ************* right." </br><br class="calibre1">"You do not like these people," the young man stated. </br><br class="calibre1">"You got that right." </br><br class="calibre1">"Especially the assholes who work here." </br><br class="calibre1">"Yeah, they're the ones who lay it on thick. They're the worst." </br><br class="calibre1">"You know who's the worst?" the young man asked. "It's that bartender," Arby Maple growled, rising from his bar stool and clenching his fists. </br><br class="calibre1">The young man said quickly, "No, not him! There is somebody much worse." </br><br class="calibre1">Maple looked around the small bar, modeled after a quaint gentlemen's tavern that had operated in Charlotte, North Carolina, in the late 1800s. It was empty now. Just the two customers and the asshole behind the bar. The bartender was a miserable piece of dog crap who deserved to get the living shit kicked out of him. But there was somebody Maple hated even more. He just wasn't sure who.... </br><br class="calibre1">"Who is it?" he demanded. </br><br class="calibre1">The young man leaned close and held his mustache in place, pointing with his other hand. Maple looked. Out the front windows, across the immaculately clean Main Street, was a small public courtyard. </br><br class="calibre1">"Him," the young man growled. "The guy with the cart?" </br><br class="calibre1">"The guy with the cart," the young man said earnestly. "There is nobody you hate more than the guy with the cart." </br><br class="calibre1">Arby Maple's lower lip curled. Hot breath stuttered from his nostrils as his body inflated with his passion. The young man was right-Arby abhorred the man with the cart. It was a soul-filling, mind-expanding malevolence. There was no reason why, and this kind of complete hatred needed no excuse. And there was only one thing to do about it. </br><br class="calibre1">The Cobbler In A Cup guy had to die. </br><br class="calibre1">ARBY MAPLE STRODE from the tavern, crossed Main Street and grabbed the vendor by the collar. The vendor's smile disappeared and his clip-on bow tie landed in the grass. </br><br class="calibre1">
And here is the header

Quote:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Unknown</title><meta content="http://www.w3.org/1999/xhtml; charset=utf-8" http-equiv="Content-Type"/><link href="stylesheet.css" type="text/css" rel="stylesheet"/><style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }</style></head><body class="calibre"><span><br class="calibre1">C:\Users\Chad\Desktop\T &amp; U &amp; V &amp; W &amp; X &amp; Y &amp; Z\Warren Murphy - Destroyer 134 - Bloody Tourists.pdb</br><br class="calibre1"/><br class="calibre1">PDB Name: Warren Murphy - Destroyer 134 -</br><br class="calibre1">Creator ID: REAd</br><br class="calibre1">PDB Type: TEXt</br><br class="calibre1">Version: 0</br><br class="calibre1">Unique ID Seed: 0</br><br class="calibre1">Creation Date: 12/31/2007</br><br class="calibre1">Modification Date: 12/31/2007</br><br class="calibre1">Last Backup Date: 1/1/1970</br><br class="calibre1">Modification Number: 0</br><br class="calibre1"/><br class="calibre1"/><br class="calibre1"/><br class="calibre1">Destroyer 134: Bloody Tourists </br><br class="calibre1">By Warren Murphy and Richard Sapir </br><br class="calibre1">Chapter 1 </br><br class="calibre1">
The above html is taken from the 'Processed' folder.

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.
Global is offline   Reply With Quote
Old 10-10-2010, 12:34 PM   #7
jackie_w
Grand Sorcerer
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: 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>
Then import the new HTML into calibre and try converting that.

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.
jackie_w is offline   Reply With Quote
Old 10-10-2010, 01:19 PM   #8
theducks
Well trained by Cats
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: 29,792
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:
Originally Posted by jackie_w View Post
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>
Then import the new HTML into calibre and try converting that.

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.
The tag should be <br /> to be valid
theducks is offline   Reply With Quote
Old 10-10-2010, 01:57 PM   #9
jackie_w
Grand Sorcerer
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: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by theducks View Post
The tag should be <br /> to be valid
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.
jackie_w is offline   Reply With Quote
Old 10-10-2010, 02:03 PM   #10
henriki
Banned
henriki began at the beginning.
 
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.
henriki is offline   Reply With Quote
Old 10-10-2010, 02:04 PM   #11
Global
Junior Member
Global began at the beginning.
 
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.
Global is offline   Reply With Quote
Old 10-10-2010, 02:17 PM   #12
ldolse
Wizard
ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.ldolse is an accomplished Snipe hunter.
 
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.
ldolse is offline   Reply With Quote
Old 10-10-2010, 02:18 PM   #13
Global
Junior Member
Global began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2010
Device: Sony reader
Quote:
Originally Posted by henriki View Post
Hey i think that this will definitely helps you....

[link removed by moderation]
Spam, I'm afraid!


Last edited by dreams; 10-10-2010 at 09:47 PM. Reason: link removed by moderation
Global is offline   Reply With Quote
Old 10-10-2010, 02:25 PM   #14
Global
Junior Member
Global began at the beginning.
 
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.
Global is offline   Reply With Quote
Old 10-10-2010, 02:36 PM   #15
jackie_w
Grand Sorcerer
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: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Global View Post
Hi

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?
I'm glad you got there.

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...
jackie_w is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 07:27 AM.


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