Main

May 11, 2009

EPUB generation library written in Java

It's come to my attention that I didn't really give EPUBGen a proper introduction, and so there's been some confusion about the project.

EPUBGen project

EPUBGen is a Java library that demonstrates EPUB generation from a variety of document formats, and which may be a useful starting point or reference code for other EPUB generation needs. That is to say, it's an effort to promote the development of a variety of tools and workflows.

Continue reading "EPUB generation library written in Java" »

Font obfuscation code, available for review

I realize this blog might have a diverse readership so I'll warn those of you who aren't developers, that this particular blog post probably isn't for you. Unless you find reading Java code interesting, you can probably skip this article. I've implemented the IDPF font obfuscation algorithm which is recommended here. The font obfuscation code can be found in the EPUBGen project, and so you can take and review, and use the code. In this article, I'm going to highlight just the portions of that project that are related to embedding and obfuscating the font information. (The project also has font subsetting and other features which I will not cover.)

Continue reading "Font obfuscation code, available for review" »

May 8, 2009

InDesign 6.0.2 and EPUB export

There's a new update to InDesign CS4. Version 6.0.2. The update fixes lots of other stuff, so you may want to look at the release notes to see what's fixed that is not related to the EPUB export, I'm only going to talk about the EPUB plug-in.

Continue reading "InDesign 6.0.2 and EPUB export" »

April 28, 2009

RTF, Word, and FB2 file conversion

EPUBGen is a project that Peter Sorotokin has started, it's a conversion utility for rtf files, word files, and FictionBook files. The output in each case is, of course, epub.

The project is open source, and available for download.

Note that there is also a .jar file for rtf2epub and it should work, but the main intent of this project is to provide source code and examples of the way things could be done. In other words, there's plenty of room for developers to improve and enhance the conversion.

The project includes code to convert a couple different formats to ePub, including generating all the required files and creating the package. The project also shows how to mangle embedded fonts, how to sub-set those font (thus reducing the size of the ePub).

Continue reading "RTF, Word, and FB2 file conversion" »

March 27, 2009

Working with the cover

The covers on your books make a first impression. So when you're creating a cover for a book you're likely to put in some extra effort to make sure it looks good. When you're working with EPUBs and Adobe Digital Editions, there are some simple things that you can do that have a big impact on the look of the covers.

Continue reading "Working with the cover" »

February 19, 2009

Options for creating the package file on a Mac

So, when I need to create an epub by hand, I'll put everything I need in a folder, and then use the Terminal & zip it up by hand. Like so:
  1. Navigate to the folder.
  2. zip -Xr9D book.epub mimetype *
Ok, so I realize not every one is comfortable working at the command line. That's where MakePackage.scpt comes in. It's an Applescript script that will take a folder and turn it into an EPUB. It expects the folder to be the same layout as the EPUB should be. So, just as if you had renamed a file to .zip and then extracted the contents. Anyway, it's here if you find it useful, if not, there's always the command line.

February 11, 2009

InDesign Secrets

Seems InDesignSecrets.com is starting to cover EPUB and InDesign. Awesome. Seems there's a real need for EPUB information for designers, publishers, and authors. Maybe this will help fill that need.

November 14, 2008

ePubPreflight version 0.1.0 (was "stylecheck")

There's a new tool for checking ePub files. The tool does not do validation, that is the role of the epubcheck tool. The epubpreflight tool is intended to check the things that are not mentioned in the EPUB spec, but that could be issues in one environment or another.

ePubPreflight can be found in the epubcheck downloads.

If you'd like to discuss the tool, head on over to the epubcheck discussion area

I'll be updating the project pages with instructions on how to use the ePubPreflight, but it's just like using epubcheck. (Run at a command line, and use 'java -jar epubpreflight-0.1.0.jar myEPub.epub'.)

Continue reading "ePubPreflight version 0.1.0 (was "stylecheck")" »

October 20, 2008

The Mars Project "PDFXML Inspector" works great as an ePub editing tool.

If you've just created an ePub and now you want to make a small change, the normal approach is to rename the file with a "zip" extension, extract the contents, make the change, and then repackage the contents.

Fortunately, there's a better way, but I'm not sure if it's been mentioned.
It's from the Mars Project over on Adobe Labs, and it's called the "PDFXML Inspector".

Continue reading "The Mars Project "PDFXML Inspector" works great as an ePub editing tool." »

October 8, 2008

Export ePub from InDesign CS4

With the release of Adobe InDesign CS4 you'll find that there's a couple of interesting new features in the Export for Digital Editions plug-in. The most noticeable are the addition of DTBook support and support for "Local Formatting". There's also some subtler changes, like floating anchored images and additional semantic information in the XHTML files.

So we'll go through the major new features and what each one does:

Continue reading "Export ePub from InDesign CS4" »

June 2, 2008

DocBook XSL - ePub target is ready for wider testing

If you're using the DocBook XSL distribution you've probably already seen that DocBook XSL 1.74.0 has been released with ePub support. Note that the 1.74.0 release is an experimental release, and is made available for testing and evaluation. See the release notes for a note about DocBook dot-0 releases.


Continue reading "DocBook XSL - ePub target is ready for wider testing" »

May 1, 2008

File size limits in Digital Editions

While the Best Practices document (over in the Adobe Developer Connection) had the recommendation that books be broken up into chapters, it wasn't clear when you needed to break a document up further, or when a book was small enough so that one XHTML file was sufficient.

With the recent update to the document (version 1.0.2) we've given you information on how big the chapters can be.

Continue reading "File size limits in Digital Editions" »

March 25, 2008

EPUB Best Practices

We've created a Developer Center area for Digital Publishing. What does this mean? Well, it's a lot of technical information around EPUB, Adobe Digital Editions, and ADEPT. Of particular interest today is also the "Best Practices" Guide. Those best practices will help publishers create EPUBs that work great across a whole spectrum of devices.

Anyway, the Best Practices, and lots of other useful information can be found over at the Developer Center:
Digital Publishing

February 20, 2008

InDesign EPUB Export and SWF behavior

By default, when you export a document or book from InDesign, each of the SWFs in the document will play as soon as the page is shown. While this might be nice for some documents you may actually want to change the default so that the files won't play until they're clicked.

Continue reading "InDesign EPUB Export and SWF behavior" »

January 31, 2008

DocBook XSL: Development

It seemed that creating production level XSLT stylesheets that convert DocBook into ePub would help publishers who adopt ePub as their eBook format. Of course we're developing the stylesheets as part of the open-source DocBook XSL stylesheets, which gives anyone using an existing distribution an easy migration path.

So Adobe is donating my time to help with this task. Of course I'm not the only one involved, Keith Fahlgren (over at O'Reilly Media) is also contributing. There's also the help and guidance from the docbook-apps discussion list. And there's always room for review and feedback.

Continue reading "DocBook XSL: Development" »

October 4, 2007

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.

August 28, 2007

Updated Export Plug-in for Adobe InDesign CS3

If you're using InDesign CS3 to create ePub documents then you'll want to make sure you're using the 1.0.1 update. The update includes an option to embed the fonts in the document and to use a TOC Style from the InDesign document, but more importantly, the update implements the OPS 2.0 v. 0.984 Draft specification (dated 16 Apr. 2007). The original export plug-in implemented a previous version of the draft, so you'll want to get the update.

You can find the update in the downloads section of www.adobe.com, and it's available for both Macintosh and Windows.

If you're already using the update, you'll see a faint '1.0.1' in the lower right hand corner of the export dialog. You'll also see the option to embed fonts and a third panel in the dialog. If that '1.0.1' is missing, then you've not installed the update.

August 15, 2007

Producing ePub Documents from InDesign

Today is the last day of Piotr Kula, who worked with us as a summer intern. While he himself has to go back to study at Berkeley, we still have a lot of documentation that he wrote while working here. I am going to edit and publish some of these documents on this blog and here is the first installment on creating ePub documents with InDesign.