Creating ePub with the Java API

I'm relatively new to ePub format, but if I understand well to use ePub programmatically, starting with XHTML or PDF content, this could mean:

  • select HTML or XHTML content and validate them with XHTML authentication (or clear them with Tydy)
  • select the PDF file to insert into ePub
  • create an XML manifest or XML packaging files and a TOC file
  • zip all files in the .epub file
  • check ePub (I saw something in google code)

So my question is that there is some kind of high level Java API to complete these steps. Of course, I can use the API for ZIP, XML in Java, but does it have higher tools?

Many thanks

------ EDIT -------

I developed an open source project to do this!

http://scribaebookmake.sourceforge.net/

+6
java api epub
source share
3 answers

I have not seen java epub toolchain; however, I had great success with Sigil.

If the goal is to make an epic, I would let Sigil go. Before I used it, I manually rolled my epics (with ant build.xml automation).

If the goal is to create a java-based tool binding, then this should not be terribly difficult, depending on how much validation and pipelining you want to do. Personally, I will start by writing an epub viewer.

As for the parts of the PDF, I just embed XHTML. There was no need to embed PDF yet. As for the epub check, if all the xml are valid and there are no dangling links before starting zipping, you will have a valid epub.

+2
source share

You should take a look at this project , which seemed to convert PDF to epub.

+1
source share

Below is a shameless plugin for a project that I have been working on myself. This is basically an EPUB toolkit written in Java for Eclipse. It comes with an API, UI, and Ant task, which lets you do just about anything. See http://help.eclipse.org/kepler/topic/org.eclipse.mylyn.docs.epub.help/help/introduction.html

+1
source share

All Articles