![]() |
#1 | |||
Connoisseur
![]() ![]() Posts: 82
Karma: 184
Join Date: Jun 2008
Device: Sony PRS-505
|
Calibre PDF to LRF losing line breaks
I'm having trouble explaining this so here's an example:
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.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,296
Karma: 23661992
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: 4,833
Karma: 59674358
Join Date: Dec 2007
Location: The World of Books
Device: Nook, 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. |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,296
Karma: 23661992
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
this is when adding LRF files or any kind of file?
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,832
Karma: 11844413
Join Date: Jan 2007
Location: Tampa, FL USA
Device: Kindle Touch
|
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,296
Karma: 23661992
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: 4,833
Karma: 59674358
Join Date: Dec 2007
Location: The World of Books
Device: Nook, Nook Tablet
|
|
![]() |
![]() |
![]() |
#9 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,296
Karma: 23661992
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: 44,296
Karma: 23661992
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: 4,833
Karma: 59674358
Join Date: Dec 2007
Location: The World of Books
Device: Nook, 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.
|
![]() |
![]() |
![]() |
|
![]() |
||||
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 |