View Full Version : PDB converting ignores blank lines


swifty.tom
11-04-2010, 01:51 PM
Hi all, I'm a new owner of a Kindle, and I thought I'd give it a try with some books in my language (Czech), converting them in Calibre. I grabbed one ebook that's in PDB format. Now the problem is, no matter what options I set for the conversion to MOBI, I can never produce the formatting that's in the original printed book:


Paragraph 1........
.......................end.
Paragraph 2........
.......................end.

Paragraph 3........
.......................end.

Meaning I can't have it output an empty paragraph as a break between logical sections of text (this is a Discworld book, no chapters). Either the paragraphs all stick to each other, indent or not, or they all have a single blank line between them. Either way I can't tell where the break is.

In the original file, this kind of break is indicated by a blank line between lines 2 and 3. Is there any way to force Calibre to turn every single line it encounters, even blank ones, to a paragraph?

Jera07
11-08-2010, 08:15 AM
I can't answer this, Tom, but I'm sure someone can! :-)

And welcome to the forums!

swifty.tom
11-09-2010, 03:41 AM
This is the solution I ended up using:
- open the PDB in PSPad
- Replace reg. exp. ^(.+)$ with <p>$1</p> (turns all lines into paragraphs)
- Replace reg. exp ^$ with <br/> (turns all blank lines into line breaks)
- add a HTML head for the additional meta info including encoding
- save as HTML and import to Calibre

This will keep the original formatting in the final MOBI output.

Juliepac
11-26-2010, 07:53 AM
Could this solution work for the same problem, but from word (nicely formatted ebook) to pdb? I lose all formatting, sometimes it's even difficult to read.
I also use eReader for ipod touch.

Thanks.

ldolse
11-26-2010, 09:27 PM
pdb/ereader is an extremely archaic format that supports very little in the way formatting features. If you're creating ebooks to read on the itouch then use epub and Stanza. Output html from MS Word, Convert to epub, and then use Calibre's content server to serve the file to Stanza.

itimpi
11-26-2010, 11:02 PM
If your iDevice has iOS4 installed, then you may also want to consider using iBooks as the reader as Calibre has inbuilt integration to iBooks via iTunes. It all depends on whether transferring books via WiFi/3G or USB is more important that is likely to be a deciding factor.

Juliepac
12-03-2010, 04:39 AM
Hi guys!

Thanks so much for the replies!
I understand that the Pdb is kind of a very simple format. Actually, I've used stanza for a long long time. But stanza lacks a feature that is extremely important to me: highlighting (yes, stanza does have it, but it's too complicated to get something highlighted in stanza). That's why I changed to eReader.
And about ibooks, I really don't like it. Its features are really poor if you compare it to stanza or erader.
But thanks anyway, guys!