06-20-2010, 06:28 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2010
Device: BEBOON ONE 2010 EDITION
|
Pdf to Epub conversion - Newby
Greeting to everyone. I'm Sergio from Italy.
Todays is my fist day with Caliber and my fiest e-book reader : Bebook One 2010 edition. I have a simple question, as for now : if i convert a .pdf file to .epub no problem, i did it, quite simple. Problem : if I use the zoom function, a simple x2, the text doesn't reflow ( same problem with the original .pdf) it is bigger BUT there ise a carriage return after the final word of each line ..., example : Original : aaaaa bbbbb cccc X2 : aaaa bbbb cccc Please can you tell me how to set Calibre to avoid thi problem ? Best regards and thanks in advance. |
06-21-2010, 12:50 AM | #2 |
Enthusiast
Posts: 47
Karma: 120
Join Date: Jun 2010
Device: Kobo
|
Conversion of PDF to Epub is very flaky, and I think it would pay to remember that Calibre is showing at version 0.7, very much pre-beta. The fact that it works at all is a great benefit!
While we're waiting for conversions that hold up some of the formatting, manually editing (or rather, wholesale replacement) of the stylesheet is needed. But I think you're referring to the common problem Calibre has with taking PDF files that have hard line-breaks and creating an output Epub file where every line is its own paragraph. Very annoying. One solution I use is to use Calibre to convert the PDF into an RTF file, then edit this RTF and remove the hard line-breaks. If you are comfortable with regular expressions this isn't too hard, but even in Word it's possible (you're trying to replace every paragraph starting with a lower-case letter with a space, so do Edit/Replace then change every instance of "^p^ta" with " a" (note the space) selecting "Match Case". Do the same with "^p^tb" to " b" and so on through to "^p^tz" with " z". Now remove all multiple spaces (replace "[space][space]" with "[space]"), do any other fiddling you wish to do (e.g. removing tabs or whatever), and save the document. Go back into Calibre and convert the RTF file into an ePub and it should be a lot closer. It sounds a pain but only takes a couple of minutes. With a regular expression editor it's even quicker. Charles |
Advert | |
|
06-21-2010, 04:41 AM | #3 |
Guru
Posts: 695
Karma: 822675
Join Date: May 2010
Device: Kobo Aura, Nokia Lumia 920 (Freda)
|
Alternatively, you can play with Calibre's line unwrapping factor until you find a value that works for your specific input. I've found 0.50 works with many PDFs I've converted, but not all. As of right now, trial and error is really your only option.
Alternatively alternatively, turn on Calibre's debugging mode when you do the conversion. This will save all of the intermediate conversions in the folder you choose (PDF to raw HTML with <br /> line breaks, raw HTML to cleaned up HTML after attempting to unwrap lines and replace <br />s with proper <p />s, etc). You can then clean up the HTML directly and reconvert starting from HTML rather than PDF. Also useful for playing with header/footer regex generation if the default isn't working on your input. |
06-21-2010, 11:09 AM | #4 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2010
Device: BEBOON ONE 2010 EDITION
|
Ok, thank you very much for useful informations, i will try one file at a time as suggested, trying to achieve the best result...
Greetings Sergio |
06-22-2010, 04:05 AM | #5 |
neilmarr
Posts: 7,215
Karma: 6000059
Join Date: Apr 2009
Location: Monaco-Menton, France
Device: sony
|
Best of luck, Sergio. Good to have your company. Cheers. Neil
|
Advert | |
|
06-22-2010, 04:12 AM | #6 |
Chocolate Grasshopper ...
Posts: 27,599
Karma: 20821184
Join Date: Mar 2008
Location: Scotland
Device: Muse HD , Cybook Gen3 , Pocketbook 302 (Black) , Nexus 10: wife has PW
|
Welcome Sergio , you will get there with trial and error ....
Welcome too, to Charles and toddos |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF to EPUB conversion | jfontana | Calibre | 2 | 03-17-2010 03:09 AM |
epub to pdf conversion using calibre | rblearn | Calibre | 0 | 02-23-2010 04:57 PM |
pdf to epub conversion | mediax | Sigil | 16 | 11-19-2009 03:48 PM |
Help with conversion from PDF to EPUB | Fizz | Calibre | 5 | 10-25-2009 11:48 AM |
PDF to Epub - a new conversion tool | Nate the great | News | 0 | 09-18-2009 07:47 AM |