View Single Post
Old 04-02-2011, 04:15 PM   #3
rglk
Member
rglk began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Mar 2011
Device: PC (Linux)
Quote:
Originally Posted by ldolse View Post
Can't guarantee this will work, but try converting it to epub first and make sure the document's own css is set to use a serif font. My guess is the original doc is sans-serif. Then convert the epub to pdf.
Thanks for your suggestion. When I use Calibre to convert from mobi to epub, I just get a single file file_name.epub, with no access to any stylesheet. When I convert mobi to oeb in Calibre (with ebook-convert) or unpack it with mobiunpack.py, I get access to the css stylesheets, but they turn out to have no specification of fonts whatsoever. I suppose that's left open in the mobi file, so that the font can be set in the ereader application.

I could of course edit the css file in the unpacked ebook, recompile it with kindlegen and then convert it e.g. in Calibre. But I found out that Calibre already offers the possibility of overriding the css through its "Extra CSS" option.

So here is what I did:

In Calibre 0.7.32 added the mobibook to the library, then converted it from mobi to pdf with the following settings:

In Look & Feel set Base font size to 16.0 pt
In the "Extra CSS" box added:

body{
font-family:Times New Roman, Georgia, serif;
}

In Page Setup set:
Output profile: Default Output Profile
Input profile: Mobipocket Books
Margins, left & right: 144 pt
Margins, upper & lower: 36 pt

In PDF Output set: letter, portrait

With these settings one gets a PDF with 8.5 x 11 in. pages with 2 in. horizontal margins and 0.5 in. vertical margins, and all the text is in Times New Roman.
rglk is offline   Reply With Quote