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 05-31-2010, 01:55 PM   #1
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
Calibre doesn't import all of PRC file

I have a non DRM PRC file that Calibre doesn't appear to fully import. When I convert it to ePub, I'm only seeing about the first 20% of the book. The TOC works, and the text is good until it just suddenly stops. I'm getting less than 6 chapters out of 29. There were no error messages. Converting to RTF also produced a file that stopped at the same point.

I tried the online converters 2EPUB and ePUB BUD with essentially the same results, so I suspect there might be something wrong with the file. However, I can see the full file in Kindle4PC. I don't have any other PRC viewers.

Anyone have any idea what is going on? I'd like to get this in ePub format on my Sony PRS-600.

Last edited by MSJim; 05-31-2010 at 11:27 PM.
MSJim is offline   Reply With Quote
Old 06-01-2010, 12:40 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,887
Karma: 12755553
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
To start can you view the file in Calibre's ebook viewer?

Quote:
Originally Posted by MSJim View Post
I have a non DRM PRC file that Calibre doesn't appear to fully import. When I convert it to ePub, I'm only seeing about the first 20% of the book. The TOC works, and the text is good until it just suddenly stops. I'm getting less than 6 chapters out of 29. There were no error messages. Converting to RTF also produced a file that stopped at the same point.
Try setting a directory in debug prior to converting the file. Calibre will dump to that directory the initial html then it will show you your book at each step.

Viewing the initial html will tell you if the initial step has the whole book, if it does then you can review the css and the html at the point where it stops and see if you can discern the cause.

Good Luck
DoctorOhh is offline   Reply With Quote
 
Advertisement
Old 06-01-2010, 12:40 PM   #3
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
dwanthny:
Thanks for the suggestion. I'll give it a try. I'm very limited when it comes to HTML code though.

I've achieved my original goal of getting the file in ePub format via a very round about method. I tried several converters, and finally got the whole file in a form I could deal with using mobi2html.exe. I then viewed the file with Firefox, copies it to the clipboard, and then pasted it as RTF into Word. I could have skipped the Word step, but I decided to do a little formatting before moving on to Calibre for conversion to ePub.
I suspect there must be a more efficient way to achieve my end goal, but at least this worked.

Although I've got my ePub file, I still intend to troubleshoot the original problem because I'd rather not have to go through the multistep process.
MSJim is offline   Reply With Quote
Old 06-01-2010, 01:42 PM   #4
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
dwangthny:
I tried your suggestion. The debug input folder had two html files in it. One, debug-raw.html, has the entire file and is 388k, but the other testfile.html is only 82k and has the text chopped short.

As I said earlier, I'm HTML challenged, but I can't see anything in the HTML code that should cause the file to stop importing. At the point the text stops, the raw file looks just like it does everywhere else to me.

I'm including an attachment with two clips from the HTML files. The first is from the raw file starting at the paragraph before the error, and continuing a couple of paragraphs into the missing text. The second clip starts at the same place in the abbreviated file and continues into part of the error area. It's just a continuous series of </span>'s to the end of the file.

Is there something in the code that I'm missing?
Attached Files
File Type: rtf Clip from the debug.rtf (41.9 KB, 78 views)
MSJim is offline   Reply With Quote
Old 06-01-2010, 01:51 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,329
Karma: 5382313
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
This will be almost certainly because the PRC file contains invalid bytes that are causing the HTML parser in calibre to choke and throw away the content after the invalid bytes.

There's not an awful lot that you can do about it, I'm afraid.
kovidgoyal is online now   Reply With Quote
Old 06-01-2010, 03:26 PM   #6
MSJim
Bookworm
MSJim began at the beginning.
 
MSJim's Avatar
 
Posts: 104
Karma: 26
Join Date: Sep 2009
Location: Central Georgia, USA
Device: PRS-600, Nook STR
Thanks Kovid. I won't waste any more time on the problem, and hope I don't encounter any more files like this one.

At least I did learn that I have another way to get an HTML file from a PRC input.
MSJim 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
Automatically convert file to EPUB upon import into library astrodad Calibre 6 07-23-2010 01:22 PM
Can Calibre explode a MobiPocket .prc file and then reassemble it? cyberbaffled Calibre 1 06-16-2010 12:14 AM
File naming convention for best import result? Belfaborac Calibre 1 06-07-2010 10:14 AM
PRC file doesn't fully import into Calibre MSJim Kindle Formats 1 06-01-2010 03:55 PM
Howto import a file created in OpenOffice? roger64 Sigil 7 03-23-2010 01:21 AM


All times are GMT -4. The time now is 01:49 PM.


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