ePub export from InDesign, Tips & Tricks

By Ron Bilodeau
March 8, 2010 | Comments: 5

I have been wanting to do this for a while and now have the motivation to begin.

This past fall, I gave a presentation on how to set up your files (using InDesign) in order to achieve a usable ePub file.
During that presentation, I was asked a very good question that, at the time, I did not have the answer to.
Well, I am happy to say that I now have the answer. So, without further adieu, let's start sharing some Tips & Tricks!

  1. How to keep unwanted text elements from being included in your ePub file.

The person who attended my presentation with this issue had the following problem:
She was setting up her page footer information by using defined Variables on her Master Pages (which is a great way to automate).
Unfortunately, she has multiple instances within her documents where it is necessary for her to individually customize some of those footers manually, effectively breaking it's link to the Master Page.

As most of us know, Master page items (such as footers, folios, tabs, etc.) are ignored when exporting to ePub because they are not necessary in that environment.
However, once you manipulate any of these items (as above), they become an element that will now be included in your exported ePub file. Most likely thrown at the end of the document.

If you have a situation such as this, the solution is to use Conditional Text.
Here is a great resource from Adobe on how to use Conditional Text in CS4:

For this particular situation, you would create a new Condition within the Conditional Text Panel. Give it a name, such as "Do not include in ePub". Once this new Condition is established, apply it to every instance of text that is not to be included in your exported ePub file. Simply highlight the appropriate text with your curser and select the new Condition name from the Condition panel. You can even use the Find/Change dialog to apply or change conditions (more info on that in the above Adobe reference).

Now, an important thing to remember here is that you may only apply conditions to text elements. You can not apply them to frames or other objects.

On the left side of your Condition in the Condition Panel, there is an eyeball icon that you use to show or hide all of your text elements with that Condition applied.
If you are sending your file to print or PDF, then you would leave the Condition visible.
Once you are ready to export your ePub file, simply click on the eyeball in order to render those text elements invisible and un-exportable.

I hope this helps many of you out there.




Would using a separate layer accomplish the same thing? The master-page elements could be created in a different layer which would later be hidden when it was time to export to ePub.

Yes Paul,
In this particular scenario, you could actually use a separate layer to accomplish the same thing. This is because these text elements are always in their own frame.
Good call.

If you have a situation where the text that you don't want exported lives within the same frame or story as text that you do want to keep, then that is where Conditional Text really shines.

Thanks Paul,


I find that using separate layers is a more versatile and stable method

Stability is always important and using separate layers has definitely worked for us in the past as well.

Ron, cool idea.

There is no downside of using Conditional Text. This works also, if the elements are on different layers AND it works for objects too, if the objects are anchored in a textframe.



The free platform for reading EPUB books online from any device.

Integrated with O'Reilly Labs 02/09/09.

First translations added 03/11/09.

Feedbooks integration & one-click addition added 07/29/09.

Beta Projects

Open Feedback Publishing System (OFPS)

Participate in collaborative community feedback to help refine in-progress, open manuscripts like Building iPhone Apps with HTML, CSS, and JavaScript or the published Programming Scala.

Released 05/20/09.

O'Reilly Product Metadata Interface (OPMI)

Want to know all we know about an  O'Reilly book? Give us an ISBN and we'll let you in on our (RDF) secrets!

Released 02/09/09.

Open Source

DocBook-XSL 1.74.3 with Improved ePub Output

Keith Fahlgren (O'Reilly Media) helped release the stable 1.74.3 release of the open source DocBook-XSL project and improved the EPUB generation stylesheets. Paul Norton (Adobe) and Liza Daly (Threepress) provided very helpful patches.

Released 02/17/09.

DocBook-XSL 1.74.0 EPUB Output

Paul Norton (Adobe) and Keith Fahlgren (O'Reilly Media) have contributed code to the 1.74.0 release of the open source DocBook-XSL project that generates EPUB documents from DocBook. An alpha-quality reference implementation in Ruby was also been provided.

EPUB is an open standard of  the The International Digital Publishing Forum (IDPF) and something O'Reilly is trying  to help gain wider adoption.

Released 06/02/08.