« Updated Export Plug-in for Adobe InDesign CS3 | Main | Named Activation Coming in Digital Editions 1.5 »

Exporting ePubs from InDesign

In the next couple of posts, I hope to give you an idea of what works well with the ePub export, how to get better ePub documents from InDesign, and what sort of documents would work better as a PDF. To that end, I thought I should start with giving you some background on what an ePub is and how the Digital Editions export inside InDesign works to create ePubs.

You may be aware that ePub is really made up of OPS, OPF and OCF, which are standards from the International Digital Publishing Forum (www.idpf.org). They build on other standards, including XML and XHTML. This means that the pages you're seeing in Digital Editions (when you export an ePub from InDesign) are XHTML. They have xml structures around them to aid navigation and presentation, and a package that wraps it all so that the many files are a single item on disk. Still, they are essentially XHTML and CSS, and that means they have certain strengths and weaknesses.

In building the current version of the Digital Editions export into InDesign, we made the decision to focus on book formats that lend themselves easily to automated layout - that is to say, narrative books where readability is important but the view of a double page spread or of a single page isn't a priority. Still, the XHTML nature and the focus on narrative books means that certain items won't be preserved when exporting ePubs from InDesign.

There's no support for putting text on a path in XHTML. When you put text on a path in InDesign that text would need to either be rendered as a graphic, or it looses the path. For CS3 we decided not to export the text as a graphic, so the ePub export preserves the text, but not the path, so that the text is still text in the XHTML. The same is true for text that is set at an angle. If you create a text frame in InDesign, and then rotate it a few degrees one direction or the other, the text will still be exported as XHTML, rather than choosing some other format. This means that the rotation is not exported, just the text. Of course if you have a document that uses these features, they're preserved perfectly when you export a PDF and open that in Digital Editions.

Comments

Thanks for the tips, Paul. Out of curiosity, how are things like sidebars or other items outside the main flow handled during export? Are they anchored to a nearby paragraph?

Hi Preston,

The short answer is that sidebars and other items outside the main flow will fall either before or after the main flow in the exported document (as if it was part of the main flow, but came before or after.) The placement of those items depends on where they are in reference to the first frame for the main flow. I'll try to post the details in an entry this week.

Normal page breaks don't seem to be supported in the ePub-format exported from Indesign CS3?
I have tried both as a paragraph style and by inserting a break character.

Hi Magdalena,

That's correct, the page-breaks don't make it through the conversion.

There's a work-around, but it doesn't work in every situation. The work-around is to use the InDesign book feature (and TOC feature) and have a new document for each place you want a page-break in the book. Works great if you wanted page-breaks to start chapters, but it can be a pain if you really were going to introduce a lot of page-breaks.

So, Can I take it in this way, ePub format from Indesign CS3 can be upgraded in mere future to meets idpf standard ePub format for whatever the complex file exported from Indeisgn?

Hi Gurubaran,

The EPUBs exported from InDesign can in some cases comply with the IDPF standards, but won't always be compliant.

The factor that affects compliance is actually the options one chooses during export.

If you choose to export the original images (as opposed to converting them to JPEG or GIF) then you're likely to have files in the document that no reader supports. TIFF, for example, isn't supported by EPUB and therefore not supported in Digital Editions.

If you choose optomized images and if the document has the proper metadata (so that it can be included in the EPUB) then the document InDesign creates should work with any reader that is compliant with the IDPF standards.

Hi Paul,

Is there some kind of work around so that when you export to epub it uses the TOC in the the InDesign file to generate the bookmarks/TOC that appear in the epub file? It seems a little crazy not to offer this functionality given it couldn't be all that hard to develop.

I'll explain why it's so essential to me.

I've spent an enormous amount of time designing a set of classic books which I publish on http://www.planetebook.com and give away free to people. I'm able to use the functionality in InDesign to create a perfect set of bookmarks for all sections and chapters -- all within seconds.

Now imagine that some of the books I've designed have 100+ chapters in them. Am I really expected to go and make a separate InDesign file for each, combine them into a book, and then export to epub? That's way to much work to contemplate. Really, from my perspective (because the books are quite simple and just pure text) there's little need for there to be one InDesign file per chapter.

Seeing InDesign export nicely to PDF and not do the same thing to epub is pretty disappointing, as I could so rapidly have a bunch of free books out there for people to read in Adobe Digital Editions.

It would be really nice to build this extra functionality in there for users like me.

Anyway, I'm hoping I'm mistaken and there's an easy solution to my problem. I'm really pleased about the additional exporting support in InDesign CS3 but this lack of functionality is a showstopper for me.

Thoughts?

Hi Richard,

Well, it depends on what sort of TOC you want in the EPUB after export, but as long as you've updated your InDesign CS3 to version 5.0.1 or later you do, in fact, have that feature.

With the latest version of the plug-in you'll see 3 panels on the left side:
"General"
"Images"
"Contents"

Of course it's that third panel that you want.

The "Include InDesign TOC Entries" check box will turn on the feature and let you choose a TOC style and use it for the EPUB TOC. There's an advantage to that in that you don't have to use the same TOC style for the PDF and for the EPUB, although you can. By the way, the only thing the EPUB export takes from the TOC styles is the hierarchy of Paragraph Styles.

Now, when the TOC is generated, it's generated as the navigation information for the EPUB document. The TOC doesn't show up as a chapter of the book, but shows up in the navigation panel in Adobe Digital Editions.

Ok, now even with the ability to add the Table of Contents in, I'd still recommend chunking the books into multiple pieces, usually chapter size pieces. The reason for this doesn't really have to do with the TOC, it's more to do with memory management and not being a resource hog on mobile devices. When you open a book, there's a lot of stuff a reading application can do for you, it will layout pages of text, find book marks and hyperlinks in the text (like, say if you are using footnotes in InDesign) and so the book isn't really treated so much as one long string of plain text as it is the content of a book that needs to be paginated on the fly and managed. Now, how much goes through this process of pagination depends on the size of the chunks within the EPUB. If you have one really long chunk that is a 100+ chapter book, then we're going to have to paginate that whole thing at once.

The issue really isn't anything you'd ever see as a problem on a desktop PC, but on a cell phone or other handheld device a single book all as one XHTML file isn't a good use of the resources on the device.

Paul

Paul, thanks for the detailed response. I was in fact using 5.0 so the functionality wasn't there for me. I'll give a newer version a try.

Thanks for explaining the reasoning behind it. I guess from my perspective it would be great if InDesign could just automatically break up the file into a set of XHTML files (based on the TOC) as it still means I have to break the book up into chapters manually -- if I want to make the ideal epub file.

If I have to do that then realistically I'm not going to publish epub versions as it will take me way to long.

It's absolutely fantastic having the ability to publish both PDFs and epub versions from the one InDesign file. Having it as automated as possible would make my job so much easier. I'm not sure if what I'm doing is all that common and warrants being consider for a future InDesign release, but I sure hope so.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)