|
|
#1 | |||
|
Connoisseur
![]() ![]() Posts: 82
Karma: 184
Join Date: Jun 2008
Device: Sony PRS-505
|
Calibre PDF to LRF losing line breaks
Quote:
Quote:
Quote:
|
|||
|
|
|
|
|
#2 |
|
Connoisseur
![]() ![]() Posts: 82
Karma: 184
Join Date: Jun 2008
Device: Sony PRS-505
|
FYI, by sometimes, I mean that there are some sections of a PDF where the first example will occur, and some where the second will occur, not that it will happen differently if I try it multiple times.
|
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,511
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
that's because the PDF reflow engine tries to guess which line endings are "hard" and which are not. It doesn't always succeed.
|
|
|
|
|
|
#4 |
|
Literacy = Understanding
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,969
Karma: 11090339
Join Date: Dec 2007
Location: The World of Books
Device: Sony PRS-950, Nook Tablet
|
Kovid,
I've also noted that when Calibre adds a book to the library, it chops off the first letter in the filename. For example, if the book filename is The Three Musketeers.lrf and I ask Calibre to add it to the library, it adds he Three Musketeers.lrf I have found the easiest way to reslove the problem is to rename the file by adding a leading x (e.g., xThe Three Musketeers.lrf) before adding it to the Calibre library.
__________________
Richard H. Adin www.freelance-editorial-services.com when only the best will do www.americaneditor.wordpress.com musings about books and editing |
|
|
|
|
|
#5 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,511
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
this is when adding LRF files or any kind of file?
|
|
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 18,760
Karma: 4233896
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
I've noticed this too. Has happened with the last few TOR .prc books that I have added to the db. Or maybe it has happened with all of them.
BOb
__________________
Never ascribe to malice that which is adequately explained by incompetence. --Napoleon Bonaparte |
|
|
|
|
|
#7 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,511
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
there was a bug in the PRC metadata reading code which should now be fixed in 0.4.73
|
|
|
|
|
|
#8 |
|
Literacy = Understanding
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,969
Karma: 11090339
Join Date: Dec 2007
Location: The World of Books
Device: Sony PRS-950, Nook Tablet
|
Like Bob, I noticed it with the Tor .prc files. But I also noticed it with Baen .lrf files and with .lrf files I have downloaded from MobileRead.
__________________
Richard H. Adin www.freelance-editorial-services.com when only the best will do www.americaneditor.wordpress.com musings about books and editing |
|
|
|
|
|
#9 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,511
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Can you post a link to a mobileread lrf that causes this to happen, I just tested with some random LRFs and it works for me.
|
|
|
|
|
|
#10 |
|
Connoisseur
![]() ![]() Posts: 82
Karma: 184
Join Date: Jun 2008
Device: Sony PRS-505
|
FYI,
For the books I'm currently using, I've found that if I convert to html, the line breaks for new paragraphs occur immediately after the last character of the paragraph whereas the line breaks between two lines of text in the same paragraph have a space before the break. Thus you can do a simple replace all in a text editor of " <br>" to "". Which makes sense from a typing perspective. When typing, you don't press enter at the end of a normal line (the editor automatically moves you there), so there's always a space before the next word. And when you want to create a new line, you don't insert a space then press enter, you just press enter. At least, that's what I do... |
|
|
|
|
|
#11 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,511
Karma: 2944574
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
An interesting observation. But I doubt it would be much more reliable than the current heuristics over the set of all PDF files. I do have a complete rewrite of the PDF reflow engine in my queue, so I'll keep this in mind when I get to it.
|
|
|
|
|
|
#12 |
|
Literacy = Understanding
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,969
Karma: 11090339
Join Date: Dec 2007
Location: The World of Books
Device: Sony PRS-950, Nook Tablet
|
Kovid, the next time it occurs I will send you a link. It occurred with version .72 but since I upgraded to version .73, it hasn't occurred on the one file I downloaded from MobileRead.
__________________
Richard H. Adin www.freelance-editorial-services.com when only the best will do www.americaneditor.wordpress.com musings about books and editing |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| losing line spacing when converting with Calibre | Stensie4JC | Conversion | 9 | 01-23-2011 03:47 PM |
| Kindle 3 PDF Conversion Line Breaks | mvnjpy | Calibre | 3 | 09-26-2010 09:36 PM |
| Converting from LRF: Paragraph & Line Breaks | wudaben | LRF | 0 | 07-14-2010 11:32 PM |
| Ignoring line breaks in pdf file | mike_bike_kite | Calibre | 0 | 06-14-2010 09:37 AM |
| convert to lrf : paragraph indents, line breaks | karo02 | Calibre | 4 | 01-27-2009 09:19 AM |