View Single Post
Old 09-15-2009, 08:00 AM   #17
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,582
Karma: 21743811
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by frabjous View Post
Then the PDF used Georgia, not Droid, so the !important flag is not "cascading down" so-to-speak.
Yes, that's a consequence of how CSS works. To fully control the format of a (let's call it) "badly structured" book, one would need some knowledge of CSS rules and of the classes used in the document, etc. I don't see a way out of it, other than including a full-feature CSS parser/editor/creator, which, well, I'm absolutely not going to write

This does not mean it's not possible to override anything (and everything) in the book, just that it may be not so straightforward and "drag-and-drop" as wished. In this particular case I guess you could include in your default.css:

Code:
.mypararagraph { font-family: inherit !important; }
and rather than including it in the ~/epub2pdf/default.css, I'd copy it to the current directory, and delete it once the conversion is done.

Quote:
I'll cross my fingers!
Before adopting it, however, it would be desirable to discuss the name a bit. Maybe "pdf-style" is too broad, and something like "prince-style" would be better, since there might be other XHTML-to-PDF converters one could use.
Jellby is offline   Reply With Quote