About once a week, we get a request from a reader to have our books available in a format that can be read on an eBook reader (typically, nowadays, the Amazon Kindle).
In fact, we've had a prototype form of that capability for a while now, but we've always held back. Frankly, we didn't think the devices worked well with our kind of content. Basically, the .mobi format used by the Kindle is optimized for books that contain just galleys of text with the occasional heading. Throw in tables, monospaced code listings, sidebars and the like, and things start to get messy. The .epub format (used, for example, by Adobe Digital Editions) is slightly more capable, but it also has issues.
Last week, I reopened the can of worms and tried a quick hack. Rather than render code as text, I now create individual graphics files for each code listing, and embed those in the file eBook. The result is a lot better, but still has some drawbacks:
- the code doesn't scale when you scale the font size of the body text
- the code gets chopped off a the right margin
- code listings can't be longer than a page
- the fonts are not as readable as they would have been as text, as we don't get the pixel-level control you get with native fonts.
However. even if the display code problem is (kinda) fixed, we still can't have code fonts (or any other font) inside paragraphs. And we have issues with sidebars and tables.
So, here's the question. Given all these limitations, should we go ahead and publish eBook formats alongside our PDF formats? (If we did, a single purchase would get you access to all formats.) To help you decide, here's an (unedited) chapter from Stripes: ...and Java web development is fun again:
- In PDF format.
- In a rough-and-ready HTML format
- In .mobi format (which is suitable for the Kindle—just copy it to your Kindle's
documentsfolder). You'll want to right-click and "Save As" to download this link.
If you don't have access to a Kindle, I put some screenshots down below. The last 3 show what code listings look like.
So... what do you think. Is this workable? Should we make these available, even though they're not very good, or should we wait for a later generation of eBook that's closer to the capabilities we need? Comments are open... :)
Cheers
Dave
Sample Kindle pages—click each for a full size version.













I am quite keen to get the Kindle but am waiting for its coming v2. I am all for providing .mobi, .epub in addition to pdf. For technical book, most of the time it will be pdf when working in front of computer, but it will be nice to be able to read when commute, in a plane etc. +1 for kindle and epub version.
Posted by: gaiusparx | July 29, 2008 at 02:06 PM
This was linked to on the mobileread e-book forum and seems like a pretty good demo of EPUB capabilities for technical works:
http://www.hindawi.com/epub/sample.2.2008.07.28.epub
It displays quite fine in DE. (Which, BTW, is the rendering engine used for EPUB on the Sony Reader.)
Posted by: Marshall T. Vandegrift | July 29, 2008 at 06:14 PM
My two cents:
1 - PDF is the format we need to use for technical/graphic document, as it has proven to be, until now, one of the best format. Why do we have, one more time, to lower quality and readability because of technical constraints? PDF on my iPhone is, even with a too small screen for this kind of usage, far better than Kindle like devices.
2 - To me, it is a pitty that we can not have a kind of electronic reader which deals with PDF in a native way, without a need for another format.
3 - I do not have statistics on Kindle-like market success, but as other tries years before, I think the design of this kind of objets do not meet simple users requirements and usage.
4 - We have to wait for someone to create a tablet touch screen, seen as a storage device from our computer, and able to display PDF quite efficiently, natively. Easy to use for books we buy. Easy to use for PDF documents we produce ourselves. Anyone at Apple? ;-)
Posted by: Lawrence | July 30, 2008 at 08:34 AM
I have found that the Kindle works great for certain technical content and not so great for others. However, the portability and searchability is fantastic, and being able to take all of your tech books with you on the plane in such a small format is really fantastic. While I think it isn't optimal for all cases, and I definitely think that code needs to be processed for the device a little bit, the Kindle is definitely a great solution for most technical content, especially if bundled with the PDF as well.
Posted by: Mac Brown | July 30, 2008 at 04:02 PM
It sounds to me like somebody doesn’t know how to encode and mark up their content properly. It has very little to do, apparently, with the technology of the E-reader. Your HTML sample is rather atrocious, for example.
Posted by: Joe Clark | July 31, 2008 at 06:56 AM
I don't think keeping code in a monospace font is all that important nowadays, especially in this format.
I'd be really happy to have this on my Kindle. Swap the monospace code font with bold/italized regular font that does some sort of semi-intelligent wrap (indent or Visual Studio print style line-break arrow character in front of the wrapped line).
Really, as long as the true indents are still there (especially if we're talking Python), we'd be able to follow the code and we wouldn't have to deal with code totally missing/cut off as it is in the samples above.
Many may disagree with me about monospace font being unimportant, but I really believe putting the code in a regular font, preserving indents and wrapping would be a better compromise than cutting out code entirely.
Posted by: James S | July 31, 2008 at 08:30 AM
Joe:
Yup--the HTML does suck. It was a quick hack to get something out, done about 4 years ago and never maintained. You'll find the xhtml in the epub is a lot better. But that doesn't change the capabilities of the Kindle. If has no monospaced font...
Posted by: Dave Thomas | July 31, 2008 at 09:10 AM
Dave, I've had two complaints about technical content on my Kindle. The first is the poor formatting capabilities for tables and graphics. This alone has forced me to return some books to Amazon. The second is the inability to quickly navigate to specific non-bookmarked points. This latter can be largely resolved with better navigational aids (links), but again requires extra work when publishing for ebook devices. I'd rather wait for the formatting and display capabilities of these devices to catch up with the requirements for technical content than publish prematurely.
Posted by: Mark Woods | July 31, 2008 at 10:57 AM
I have a Kindle. I've been reading a lot of Apple's developer PDFs on it. The translation is rough, but I can get 95% of the content, and I can refer back to the original PDF for any details I miss. This is still a huge net win, since I will never read the PDFs otherwise.
However, I really like the way O'Reily has started handling (some of their) e-books. When I buy the ebook, I get a bundle that includes a pdf and a mobi formatted version. The mobi version is much better on the kindle than a raw PDF translation. Again, a bit of information is lost, but I get 99% of what I need. And, again, I can refer back to the PDF to fill in the gaps.
PDFs are an incredibly bad format for e-books, since it makes them largely non-portable. They are great; however, as reference books since they are easily searchable. Getting both a PDF and a more-portable version would be a big win for me, personally.
Please, please, please consider releasing e-book bundles.
Posted by: Rich Warren | August 01, 2008 at 02:50 AM
I use the Sony Reader (didn't know about the firmware upgrade, thanks). I generally like the Reader a lot and bought one for my college student son, he uses it "every day Dad".
One of the reasons I bought an e-book reader is that I'm on a twelve step program to control my addiction to paper books. I've tried using my Prag-Pdfs on the reader but they scale down to about 2-pt type.
I even tried a used tablet-pc. It's ok but is a lot more involved than opening the Reader.
I've created pdf's and rtf-files for the reader and as long as the page size is spec'd properly, they are at least as good as a good newspaper (graphics too).
I would really appreciate being able to have a usable copy of my prag-library on my Reader.
Posted by: Alan Moyer | August 04, 2008 at 09:26 PM
Being someone who has vision problems I wouldn't be downloading the eReader version until it's as clear, accurate and scalable as the PDF format is in Adobe Reader.
It's nice that you are offering (or are thinking of) multiple formats w/ one purchase, but I wont be interested for a long time.
Thanks.
Posted by: John B. | August 06, 2008 at 04:00 PM
Wait!
The current readers are just no there yet. When you have letter sized displays then make the decision.
I have the eReader and it's a wonderful piece of kit for pure text. I have 100s of paperbacks and all the classics e.g. We the people etc.
But for tech/text books letter sized pages are the way to go. I have a dedicated monitor on my desktop orientated in portrait purely for tech book reading. Makes referencing docs as I code a piece of cake.
Posted by: Alistair Moir | August 06, 2008 at 05:40 PM
PDFs are great as reference materials, but they are hard to read on my iPAQ. So I'd prefer to have an alternative HTML variant to carry along with me as the most universal format. .mobi is too specific and not wide-spread so far.
Posted by: Mikhail Shokhirev | August 07, 2008 at 12:58 AM
I would love to get a Kindle (or something similar) but since 70% of the book I read are programing or DB books it would not do me much good. So as soon as Amazon can make it so the Kindle can render PDF's I will jump on board.
Posted by: Michael N. | August 11, 2008 at 11:31 AM
I just wanted to mention that there exists an eBook that has the capabilities required for your books: it is the iRex iLiad, and it can already read and render the PDFs I get from this site.
The only pain point: the PDFs aren't optimized for that form factor, so I have to do some rotating and zooming when I open a new PDF. On the bright side, the reader renders the figures and the code perfectly.
I hope this helps.
Posted by: Victor Costan | August 12, 2008 at 06:04 PM
Dave: I like being able to read on the go so part of me says 'do it' however, the arguments about maintaining the quality are valid as the standard of the books (regardless of the content) are part of your brand. On a personal note, I wish that I could buy a book AND get the ebook version at the same time, and only pay a little more for the privilege.
Posted by: Ben | August 18, 2008 at 09:54 PM
Please do it! If it can be a fairly automated process and you don't have to put too much work into it, I think you should have as many formats as possible.
Just make people check a "I acknowledge that xyz formats are lesser quality than PDF format, click here for more details" box.
Then they can click and see some samples. I say this even though I don't have an e-book reader because I often print 16 PDF pages onto two sides of an A4 piece of paper just to have a tiny bit of (bad quality) sustenance on the bus. Like sweets from heaven!
Posted by: Leslie Viljoen | August 29, 2008 at 03:29 PM
Technical PDF's are pretty good on the iRex iliad. It has a zoom function which allows you to cut out the white space and zoom in on the 'text square'. It remembers your zoom settings for each book you have on the device.
The Kindle and Sony ebook readers are not really designed for technical material, but as long as you keep pumping out your PDF's, I'll be happy :)
Posted by: Hasse | August 30, 2008 at 06:29 AM
Personally I won't even consider buying a kindle until the price comes WAY down, and I probably wouldn't use one even if someone gave it to me, since it has a format i can't use on my computer, and is a device I wouldn't be carrying around unless I was planning on using it. Even though the iPhone doesn't have the super-low batter consumption of the Kindle, I often carry my charger with me (the iPhone charger is less bulky than a kindle, so what advantage would a kindle offer?).
So while it sound great in theory, I can't see the Kindle being that useful except for people who are always reading novels.
Most importantly, if I'm reading one of your books, I'm most likely using my computer at the same time to tinker with things (it's hard to learn new coding techniques without actually using them!). So if I've got my laptop with me, why would I want to carry a kindle around? It's expensive, extra weight, uses a strange format, and doesn't do much of anything besides display pages of text.
So: NO. I don't see any reason to release low-quality versions of your (high-quality) books in a format that is only useful on one device--and on a device whose usefulness is highly debatable.
Even if Amazon fixed the limitations of the format, cut the price to a third of what it is now, and you gave the Kindle version free with the PDF version, it's hard to imagine using the Kindle versions much.
Posted by: Brandon Zylstra | September 01, 2008 at 06:07 PM
Technial eBooks are kind of a holy grail for me. I have meters after meters after meters of heavy books. If I go away to a friends cottage to do some work in solitude I have to choose which books I can take with me. Not to mention the sticky situation when you're on a shorter trip and you need some information and you know you have it at home in a book, you even know what page it is on.
Simply; I can't carry my books with me everywhere.
I toyed with the Sony Reader 505 the other day, and I was impressed, but I won't buy it until there's an eBook copy of my reference books.
I think you and all other technical book publishers should gang up and bully yourself into a format that can be supported on all eReaders. I'll gladly pay a few pounds extra for a paper book that comes with an eBook.
Raster images might be a good compromise, but on those gorgeous screens, it seems a bit pointless. :(
Posted by: Jocke Selin | September 08, 2008 at 08:37 AM
I regularly read technical books on my Kindle. It's not as easy or good looking as the PDF or printed book, but it has the advantage of always being with me, not something I can say about my computer or a paper book. I would buy the mobi version over either of the other two if available.
Posted by: Ron Wolf | October 24, 2008 at 08:29 AM
Of course they are ready - I bought my iRex iLiad with epaper display for the sole reason to read the 1st Version of the Agile Rails book outside in the garden, when it came out.
I do read all of my PragProg books in PDF-Format on this device. The size of the PDF fits the screen, perfectly.
I'd guess that other devices by other manufacturers are as ready as my Iliad is...
Posted by: Bernd Moerken | March 18, 2009 at 02:17 PM