making ePub with Java API
Asked Answered
B

3

7

I'm relatively new to ePub format, but if I understand well, to make programmatically an ePub starting from XHTML or PDF content could mean:

  • choose HTML or XHTML content and validate them with an XHTML validator (or clean them with Tydy)
  • choose PDF file to insert in the ePub
  • create the XML manifest or XML packing files and TOC file
  • zip the whole files in a .epub file
  • validate the ePub (I saw something in Google code)

So my question is if there is some sort of high level Java API to do these steps. Sure I can use API for ZIP, XML in Java, but does it exist higher tools?

thanks a lot

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

I've developed an open source project to do that!

http://scribaebookmake.sourceforge.net/

Baritone answered 25/3, 2011 at 6:24 Comment(0)
S
2

I haven't seen a java epub toolchain; however, I have been having good success with Sigil.

If the goal is to make an epub, I'd give Sigil a go. Before I used it I was rolling my epubs by hand (with the automation of an ant build.xml).

If the goal is to make a java based epub toolchain, then it shouldn't be terribly hard, depending on how much validation and pipelining you wish to do. Personally, I'd start with writing an epub viewer.

As far as the PDF parts go, I just embed XHTML. Haven't had a need for embedding PDF yet. As far as epub validation goes, if all the xml is valid and there's no dangling links prior to zipping, you're going to have a valid epub.

Scurry answered 25/3, 2011 at 6:31 Comment(2)
I have to create a server tool that make automatically an ePub file starting from PDF and XHTML. So I thought about Java API. I think Sigil cannot be helping to do this...or not?Baritone
@robob, No, Sigil won't help with a Java facing tool. It is more of an editor than a toolkit.Scurry
E
1

You should take a look at this project which seemed to be converting PDF to epub.

Encapsulate answered 25/3, 2011 at 7:47 Comment(0)
S
1

The following is a shameless plug for a project that I've been working on myself. It is basically EPUB tooling written in Java, for Eclipse. It comes with an API, UI and an Ant task that allows you to do pretty much everything. See http://help.eclipse.org/kepler/topic/org.eclipse.mylyn.docs.epub.help/help/introduction.html

Scanderbeg answered 20/2, 2012 at 15:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.