TeleRead: Bring the E-Books Home

News & views on e-books, libraries, publishing and related topics
April 7th, 2009

‘Is Adobe hindering e-books?’: ePub rendering is flawed

By David Rothman

Mike Cane thinks so—due to Adobe Digital Editions’ flawed rendering of ePub, for instance—and he provides some examples. Screenshot below shows how ADE can botch centered poetry and the regular text underneath.

adobebotchedePub

Digg us. Slashdot us. Facebook us. Twitter us. Share the news.
  • Digg
  • Slashdot
  • Facebook
  • Twitter
  • del.icio.us
  • Reddit
  • StumbleUpon
  • Technorati
  • NewsVine
  • LinkedIn
  • MySpace
  • Suggest to Techmeme via Twitter
  • Netvibes
  • Turn this article into a PDF!

31 Responses to “‘Is Adobe hindering e-books?’: ePub rendering is flawed”

  1. Although there’s no doubt that ADE is not perfect, I would not yet start saying they are hindering eBooks.

    The main question I have here is this, what is the HTML/CSS markup like?

    Knowing how people traditionally markup HTML in web pages I can imagine that many of these books, both professional and otherwise are actually over complicating things.

    On my experimentations so far I’ve found that if you keep your HTML/CSS code tight and simple then you won’t go far wrong. Sometimes you have to look a problems from the side, rather than front on, and in doing so you can still achieve nice results while using simple HTML/CSS.

    EPUB is not here to replicate the paper book and trying to do so will only cause you headaches, though this doesn’t mean it can’t be close.

    Let’s face it, your average novel is just straight forward text; headings, italics, indents, etc., all achievable with very simple code. Okay, tables are a little more complicated but as long as you don’t try to replicate what you would do in a paper version, then desirable output should still be attainable.

  2. But Mike, isn’t one purpose of ePub to be cover a wide variety of situations, not just poetry but also STM purposes? And what about all the public domain books that might use poetry above the main texts at the starts of chapters? Hardly the most novel situation—no pun intended!

    As an end user I’m a huge ePub fan, but I expect more of the standard’s implementers than they are delivering right now. Rather than tolerating ePub’s deficiencies, we should press in a constructive way for improvements. I’d encourage publishers to use ePub but work hard to educate Adobe and others on the need for better implementations. And if the standard itself can be improved, which it can be, then so much the better!

    Meanwhile see my FBReader item where I bug ‘em about the missing CSS recognition. I’m not just picking on Adobe, in other words.

    I salute both FBReader and Adobe for their ePub efforts, but don’t intend to gloss over the shortcomings.

    Thanks,
    David

  3. I’d suggest the fellow above go download the LIT version of this:
    http://ebooktest.blogspot.com/2009/04/ah-gorgeous-lit.html

    And compare it to the ePub version also available.

    If he can’t see the LIT is superior, then, Next!

  4. isn’t one purpose of ePub to be cover a wide variety of situations,

    That’s what I thought. I thought it was supposed to be the next great hope for versatility in rendering text on screen. It may be the device. It may be the converting software. It may be that the underlying coding principles are off. I don’t know, but making it difficult to get a nice-looking EPUB file isn’t going to push the crusade along.

    And about the LIT file that Mike references above. It took a few tweaks on the style sheet and about an hour to get a product I was happy with. It took me 2 days and 300 tweets to get an EPUB file that looks like I threw it in Photoshop and laid a sandstone filter over it (amongst other crimes). I got better output on my IMP files in less time and that’s not the easiest thing to mark up.

    What REALLY REALLY REALLY bothers me is that WE (and yes, me too) have been banging the drum for standardization of a format that’s a time suck from the beginning of the process all the way to the end.

    If someone came up with a (new) device that read LIT files (do they? if so, call me!), I would kiss the ground they walk on and possibly buy them dinner.

    For once in their lives, Microsoft got something right. And then they seem to have abandoned it.

  5. I missed this and meant to comment on it.

    I’d encourage publishers to use ePub but work hard to educate Adobe and others on the need for better implementations. And if the standard itself can be improved, which it can be, then so much the better!

    David, ReaderWorks already does the job well and fast. The LIT files turn out beautifully (if you’ve marked them up right) and MS Reader renders it beautifully AND it’s easy on the eyeballs (that ClearPrint thing is fantastic). It’ll be years before we see that kind of excellence in output in an EPUB file with gentle nudging from publishes and whatnot. I’m all for standardization, don’t get me wrong, but it occurs to me the efforts toward adopting EPUB is reinvention of the wheel–Especially when a superior (and easier) product (from producer to consumer) already exists.

  6. But Moriah, ePub built on the .lit format, via OEB. Some of the same people were even involved.

    There is a HUGE difference in one way between .lit and ePub. The former is is a proprietary Microsoft format. Do we really want one corporation, whether it be Microsoft or Amazon, to control the e-book business?

    Furthermore many stores don’t even carry .lit.

    Simply put, let’s think of the long-term interests of both business people and consumers rather than hoping for a short-term solution.

    Incidentally, last I knew, OverDrive gave us ReaderWorks. I think Fictionwise would have a few things to say about OD, lol.

    Thanks,
    David

  7. The ePub format is off to a great start, with growing support from many members of the Epublishing community. But there is one iceberg that could sink the ePub movement: the failure of software and hardware makers to render ePub correctly.

    Publishers do not want to make many versions of the same ePub ebook: one for the Sony Reader, one for Adobe Digital Editons, and so on. We have been there — lost in the labyrinth of a dozen formats — and we don’t want to go back.

    Two ways to read ePub that are getting it mostly right are Stanza, and BookWorm. If other reading systems want my eyeball time, then they will need to improve their ePub support.

    Michael Pastore
    50 Benefits of Ebooks

  8. David, maybe I’m going to the wrong e-stores, but LIT is ALWAYS an option and usually one of the few.

    No, I don’t want one corporation (esp MS) to have that kind of power and control, but I am puzzled as to why, if EPUB is built on the same platform LIT is, that it has A) taken so long and B) is so inferior in production.

    Kirk, over on Mike’s blog had an interesting comment:

    “The bigger issue is that as we see wider ePub implementation we could see an ebook equivalent of the browser wars. Not all rendering engines will support the spec in quite the same way, leading to a range of challenging formatting issues across devices and applications.”

    So I can see this issue simply may never go away. But four major browsers (IE, FF, Safari, and Opera) that work on all OS’s is a lot less complicated than 9 semi-major file formats that may or may not or absolutely will not work on 25 different devices. It can’t *all* be the fault of the rendering software.

    YES. We need a standard. I WANT a standard. I’d like it to be EPUB. But right now EPUB seems to be rather immature, especially in comparison to what’s out there that works on both the producer and consumer end. It seems to be Peter Pan; it just doesn’t want to grow up.

  9. Peter Sorotokin Says:
    April 7th, 2009 at 11:16 am

    Well, clearly there is a problem. However, without looking at the mark-up it is hard to say if the problem is in the authoring tool or Digital Editions.

  10. This is a real technical problem with the choices IDPF made with the epub format it’s just not posible to make good and coherent readers when the you can get anything past the validation produdt due to the format setting no limitation and giving no definition on how presentational markup should be done. and this is even thoruh epub was meant as a presentation format and dont support the metadata level og a typical backend format like TEI-C

  11. This discussion is giving me flashbacks to 2003 when web standards were a hot issue. Back then, designers were beginning to realize that the old way of designing layouts for the web was seriously flawed. A standards-based design movement emerged to promote designing with valid XHTML/CSS and a separation of presentation and content.

    If you were a web designer in that era you were in for quite a bit of pain (or experimentation, depending on your perspective), for a couple of reasons:

    1) Designing web pages with XHTML/CSS requires quite a bit more precision and effort than the old way of designing page layouts with nested tables and font attributes. In many cases these challenges were compounded by design tools that were not up to the task of generating valid code.

    2) While the web browsers of the era supported web standards, they didn’t all support the standards in quite the same way. Internet Explorer’s rendering of CSS in particular gave standards-based web designers fits.

    At the time there were many who argued that web standards weren’t worth the effort and that we might as well continue coding web layouts the old fashioned way. Fortunately that worldview didn’t prevail. The XHTML and CSS standards weren’t the problem. Rather, the many inconsistent implementations of those standards (CSS in particular) were the problem.

    So, what was the solution? Well, it didn’t involve abandoning CSS and taking the easy way out. Instead, there was the emergence of a huge community of bloggers and designers devoted to web standards. Designers worked through the various compatibility headaches together.

    Over time the tools got better, browser support got better, and web designers got better and smarter. Without question, the web is a better place today because web-standards prevailed. And that happened because there was a strong community of talented web designers who realized the value of standards and weren’t about to give up.

    I see the same situation with ePub. It’s important to remember that this is still a relatively young standard. You don’t get universal format support and foolproof authoring tools overnight.

    This is all a very long way of saying that Mike’s experiments are the beginning of what might be a long process of working through these issues. In the meantime, there are places you can go for help. As Liza Daly tweeted earlier this week:

    If you’re having trouble converting a file to ePub or getting it to look the way you want, join the ePub Community list: http://bit.ly/B26oC

  12. Nick Bogaty Says:
    April 7th, 2009 at 2:20 pm

    To re-iterate Peter’s point above, it is impossible to know whether this is an ADE rendering issue or an issue with the markup of the EPUB file without the actual EPUB file (screen-shots help little). If the author posted the EPUB file, we could review and comment appropriately.

  13. Logan Kennelly Says:
    April 7th, 2009 at 5:07 pm

    Moriah: “if EPUB is built on the same platform LIT is, that it has A) taken so long and B) is so inferior in production”

    That is an excellent question that I’d like to know the answer to, as well. I can take an expanded LIT file, add a few metadata files, zip the result, and end up with a nice ePub file. When people talk about the lack of ePub tools, I can only assume that the LIT tools must have licensing clauses preventing their use for ePub.

    As for rendering, this is definitely an Adobe Digital Editions issue! It seems as though some people are missing the fact that Stanza avoided all of these issues by re-using the HTML engine that was well-tested and readily available.

  14. I’m probably missing something with Stanza desktop, then, because I can’t get it to run on my machine.

    As for licensing LIT, that’s probably a good point and I’d thought about it, but people backward engineer stuff all the time. Wouldn’t it be easier to backward engineer LIT?

    While my EPUB file looks atrocious on ADE, it doesn’t look *that* much better in the Sony desktop reader. Or at least it doesn’t look the way I WANT it to look, whereas it DOES look the way I want it to look in LIT.

    See Mike’s post w/ link above for screen shot.

  15. Joseph Gray Says:
    April 7th, 2009 at 6:31 pm

    You don’t really need to reverse engineer the LIT format. It is mostly a standard OEB ebook, which epub has evolved from. There are a few MS specific markup additions. The LIT file itself is similar to a Zip file, but uses a different compression algorythm and may or may not include DRM.

    The real reason that most (not all) LIT ebooks look so nice is that MS worked to get the authoring tools created, provided some fairly good documentation on how an ebook should be formatted and most importantly, the MS Reader software was the only way to render those LIT ebooks.

    MS exercised a lot of control over the entire process. We don’t have that with epub, which as we’re seeing, is both good and bad.

    Yes, we desperately need more and better authoring tools that enforce best practices and generate strictly valid epub. There is enough wiggle room in the epub spec that you can generate valid, but crappy ebooks.

    On the other end, none of the current epub readers do a good enough job with rendering. I’m sure things will improve.

    Personally, I think that the current epub spec left too much as “recommended” instead of “required”. In a later version of the spec, hopefully this will change.

  16. Logan Kennelly Says:
    April 7th, 2009 at 6:32 pm

    Moriah, you accurately point out that even with a single product, namely Stanza, there is no guarantee of a consistent layout. The Mac and iPhone OS version of Stanza use Webkit (and, while they should be similar, there may be slight differences even here) while the Windows version of Stanza uses IE. I only have experience with the iPhone OS version where I have been happy with the rendering so far.

    There is no need to reverse-engineer LIT; it is well documented and, as I said, essentially the same format as ePub. When people around here talk about ePub support, they generally mean the production tools. These last few articles, though, are highlighting the need for consumer viewers, as well.

    Oh, well. here’s to hoping that the ePub-enabled eReader will put to bed all these complaints. I’m certainly eager to see the new release, but, if anything, these complaints highlight the desire to spend time polishing software before ePub gains a bad reputation.

  17. Between Joseph’s comment and Logan’s, it occurred to me that this EPUB candle needs to be burned on both ends, consumer and producer, at the same time.

    Obviously I don’t know much of the history behind the LIT, but I DO know that as both a producer and consumer, the production tool is easy sleazy and the product is beautiful to look at (and easy on the eyes).

    Joseph,

    Personally, I think that the current epub spec left too much as “recommended” instead of “required”. In a later version of the spec, hopefully this will change.

    From your fingers to God’s ears.

  18. Peter Sorotokin Says:
    April 7th, 2009 at 11:47 pm

    OK, this is a bug in Digital Editions. It is caused by this CSS snippet:

    div.poem { display: table; margin-left: auto; margin-right: auto; }

    The problem is that the div which is styled as table contains only blocks, not table-rows. CSS 2.1 requires renderer to create implicit table rows and cells in this case, but it does not work right in Digital Editions.

    BTW, “margin-left: auto; margin-right: auto;” is not an EPUB-compliant way of centering the content, since OPS explicitly allows “auto” to be treated as 0 (section 3.3).

  19. Joseph Gray Says:
    April 8th, 2009 at 12:25 am

    Great to see that Peter is on top of things. His last point about “auto” being allowed to be treated the same as “0″ is a good example of the “wiggle room” that I was talking about that causes problems.

    I just finished an informal test, using Moriah’s epub. ADE does the best job displaying it, followed by FBReader, then Azardi R2 and dead last is Stanza (Windows).

    The two surprises to me were FBReader and Azardi. FBReader has come a long way with epub support. It still has a ways to go, but the recent versions are substantially better with epub. I am surprised that Azardi displayed things worse than FBReader, given its reason for being (a strict, compliant epub renderer).

    A few comments to Moriah: You don’t seem to be taking full advantage of what you can do with epub. For example, epub supports font embedding. Comparing with the PDF version, the epub would be greatly enhanced if you used the same fonts you used in the PDF.

    You may also want to use another creation tool for the type of control you want to achieve. Calibre is fine for the average user who wants to convert ebooks between one format and another. I don’t think it is suited as a publishing tool for getting professional results.

    I can’t comment on InDesign, as I can’t afford it (unless someone wants to give me a copy). You might try that eScape plugin for Open Office (I haven’t gotten around to that yet), or even markup things with a text editor. It isn’t very hard. Notepad++ is a good text editor for this type of thing.

  20. Joseph, thanks so much!!!

    For example, epub supports font embedding. Comparing with the PDF version, the epub would be greatly enhanced if you used the same fonts you used in the PDF.

    I didn’t know that until tonight when Mike Cane informed me that his pro Abyss copy had an embedded font. Doesn’t that make it bulky? I’ll work on that, though. It would be nice to match the PDF.

    You may also want to use another creation tool for the type of control you want to achieve. Calibre is fine for the average user who wants to convert ebooks between one format and another. I don’t think it is suited as a publishing tool for getting professional results.

    Well, and that’s the problem I was in a fash about all weekend long. I have eCub but apparently haven’t given it a fair shake since I tried to put an HTML doc through it before I knew better. I downloaded both OO and eScape, but I haven’t gotten around to that, either.

    I use WordPad for my markup.

    Awesome insights and thank you. I really appreciate it.

  21. David, please don’t get me wrong, I’m not tolerating EPUB’s deficiencies. But I am taking the same approach as what I do with web design; keeping things simple whenever possible, and by simple I don’t me ugly – or at least I hope my files are not ugly ;-)

    I’m not sure how those examples showing the poetry were marked up but, I’ve had no problems so far when I implement the same feature.

    I still get the impression that people are trying to do pixel perfect layouts. People had the same layout challenges with web design back in the early 2000’s, it still happens now, although I think most designers have come to terms with the differences between print and web.

    Creating beautifully formatted eBooks is great when they are read on the desktop, but what happens when you throw the thing at an iPhone — we can’t possibly expect to keep that same layout.

  22. Thanks, Mike. I agree with your philosophy—E can’t always replicate P precisely. But even considering challenges like the iPhone, I think that ePUb could hahdle things better.

    Meanwhile big thanks to Peter Sorotokin for not sweeping ADE’s CSS 2.1 problem under the rug. I’m confident that a fix will be on the way when practical.

    On another topic, I continue to hope that Adobe can come up with some lower-cost and easier solutions for e-book creation than its current ones. Any thoughts on this, Peter? Rootin’ for some good things to happen.

    Thanks,
    David

  23. Alan Wallcraft Says:
    April 8th, 2009 at 9:00 am

    As several of the posts above point out, LIT is essentially OEB which is the starting point for ePub. Do straight forward LIT to ePub conversions render as well in existing ePub Readers as the original LIT in MS Reader? If not, then how about Calibre’s LIT to ePub conversion? If this does not work well then Calibre can probably be improved to make this work (unless the ePub Readers are broken).

    LIT isn’t enough on its own for an ePub subset that is known to work well, but it might be a starting point for such a subset.

  24. Peter Sorotokin Says:
    April 8th, 2009 at 10:34 am

    Solutions to e-book creation:

    In my experience, very good results can be achieved by using semantic (or semi-semantic) mark-up and transforming it into EPUB mechanically. This way, a layout expert can create and tweak a template and an author/editor can concentrate on the content. I have experimented with DocBook, Wiki and FB2, I expect TEI would work well too. An “authoring tool” there would mostly be code that you can tweak to match your needs, not some sort of shrink-wrap software. Is there interest in doing something like that? What kind of input formats are interesting?
    Doing WYSIWYG is more problematic, but can also work if you use styles rather than on-the-spot formatting. I do not think pure WYSIWYG tools for EPUB would work well for serious authoring. For a “casual publisher” I expect Buzzword will evolve into a practical EPUB authoring solution.

  25. I had a reply yesterday that Teleread sent to Electron Hell, so I’m really pissed off about investing time in Comments here, OK?

    >>>I just finished an informal test, using Moriah’s epub. ADE does the best job displaying it, followed by FBReader,

    What FBReader? I D/Led the one available and it couldn’t do the Pro Abyss. I gave it mine and everything was crap.

    Now if THIS Comment goes to Electron Hell, Teleread has seen the last of me in Comments, goddammit.

  26. Heck, Mike, we’re sorry about the comment problem and want to fix it. We’re using WordPress and Akismet and don’t even have a “block Mike” filter. In fact, you generally have a pretty decent S/N ratio. The rule is, the more appreciated the commenter, the more likely our software gremlins will pick on him or her. I’ve asked Paul to do a post telling people exactly how to report problems with commenting or access. Please follow through. We’ll tell you what details to report. That said, I doubt we have more problems than WordPress blogs as a whole.

    Thanks,
    David

  27. The key issue with epub is that the IDPF went feature bananas choosing to support everything costing it the ability to get anything just right.

    if you look at lit you will see that it’s a lot simpler and based on the older web standards.

    Theres this myth that the code behind the web have become simpler and more rigid this is actually not the case the standards have been adopted to allow every hack and nonconformist behavior, epub is born in the new ago of non restrictive spcifications while lit was born back when standards were simpler to implement but did not support anything everyone wanted.

    the basic jar like container is the same and the old html4.0strict with css used in lit is for the most part embedded in the much much more complex xhtml1.1 with css2.1 but lit is OEB complient in the same way that ASCII is UTF-8 complient.

  28. Using ‘margin:auto’ is typically used in web design to achieve centered layouts, so allowing ‘auto’ to be treated as 0 would create a lot of broken XHTML layouts, at least if that XHTML was authored according to existing conventions.

    Using ‘display:table’ is unconventional, and should have the same effect as the more conventional ‘display:block’ Even better semantically would be to just use a series of block elements for each line of the poem.

    This is one of the main problems with everyone using DE as a litmus test for layouts. Many EPUB reading systems are now either based on Webkit, Gecko or cross-platform browser rendering engines. These are well-documented and familiar to frameworks and developers, so it reduces the amount of guesswork in how layouts will perform.

    It’s still a mystery what engine DE uses, and therein lies the problem. If Adobe could document the quirks and bugs of the internal document rendering system of DE, we’d all be a lot better off. It’s probably a derivative of the limited engined used by the Flash Player, but I’m not sure. Peter, is developer documentation on the roadmap for DE?

  29. Joseph Gray: “You don’t really need to reverse engineer the LIT format. It is mostly a standard OEB ebook, which epub has evolved from. There are a few MS specific markup additions. The LIT file itself is similar to a Zip file, but uses a different compression algorythm and may or may not include DRM.”

    ***blinks***

    Most of what makes LIT files look good is in how the renderer renders the OEBPS 1.0 markup contained in the LIT archive, but it is certainly not a ZIP archive or anything close. It’s an MS-specific archive format which contains many many bells and whistles to help renderers do things like quickly start rendering from any arbitrary point in the book and render arbitrarily long streams. This is why e.g. LIT on PocketPC has no 300k stream maximum like the Sony Reader version of AdobeDE has for EPUB files.

    There’s no LIT-specific documentation available that I know of, but LIT is an extension of the ITOL/ITLS format, which you can find quite a bit about. The LIT extensions which have been reverse engineered are expressed code-wise in the calibre LIT extraction and generation code. (I’ll get around to writing up some documentation at some point…)

  30. Joseph Gray Says:
    April 9th, 2009 at 7:39 pm

    >Most of what makes LIT files look good is in how the renderer renders the OEBPS 1.0 markup contained in the LIT archive, but it is certainly not a ZIP archive or anything close.

    I did mention that the reader was a large part of why things looked so good. In fact, I have posted here before that I think MS did a fine job with their ebook reader software and much of what they did should be emulated.

    As for the Lit archive itself, I did not say it was a Zip, I said it was similar, but used different compression. I didn’t see the need to bog down this discussion in technical details. Don’t assume that just because I used a simple analogy that I don’t know more of the specifics.

    >There’s no LIT-specific documentation available that I know of

    I don’t currently have copies, but a few years back I found three different documents on the MS site that detailed Lit and the MS extensions, as well as recommendations on how best to format a Lit ebook. I don’t know if it is still available, but such documentation certainly does exist.

  31. @Joseph Gray: Ok, a bit of a misunderstanding it seems. After writing the calibre LIT extraction and generation code, most of what “LIT” is to me is the archive. The markup is almost just OEBPS 1.0, so I don’t usually think of that as “LIT.” As someone mostly interested in using existing tools to produce well-formatted books, what you think of when considering “LIT” appears to be primarily the markup, rendering details, etc. Fair enough.

    And the documentation is definitely still present, but contains no information on LIT-the-archive-format, which is what I was referring to.

Leave a Reply

Subscribe without commenting