Geertjan's Blog

  • May 4, 2014

EPUB Tool Fosfor Lives On (Part 2)

Geertjan Wielenga
Product Manager

Part 1 of this series on Fosfor, the free and open source EPUB tool (https://java.net/projects/epubopentoolbox), was 7 months ago. Time for part 2, clearly. What's happened in the past 7 months?

Well, I did some work on this project again about two weeks ago. I decided to continue to use JavaFX for its WebView component. However, I simply could not get the WYSIWYG stuff from the HTMLEditor to work in the WebView, and vice versa. I.e., as I have mentioned several times, and blogged about in detail here, when talking about this JavaFX stuff, integrating the best of both worlds of the HTMLEditor and WebView just doesn't work. Not for me anyway.

My compromise solution is to integrate BOTH of these components. So, now, Fosfor has a "View" tab, which renders 100% correctly, i.e, the CSS and the images that are defined in the source file are shown in the view correctly:

In addition, Fosfor now has an "Edit" tab, which doesn't show the CSS and images at all. However, maybe that doesn't matter. In the "Edit" tab, you have the HTMLEditor from JavaFX, so that you can do WYSIWYG editing, i.e., graphically, with all the tools for resizing text, changing fonts, etc:

There's also a "Source" tab, where you have the HTML from the source file, with syntax coloring and all the cool features that the NetBeans HTML Editor provides.

The next step is to synchronize the "Edit" tab with the "Source" tab, as well as with the "View" tab (so that changes in "Edit" and "Source" are visible in "View"). I've done this before in an earlier version of this tool, so just need to reimplement that in this version, shouldn't be hard.

After that, the priorities are to (1) make sure all of this works on Windows and Mac OSX (especially all the JavaFX stuff), (2) create a TOC window like in Sigil, (3) create different export formats, especially XML (which is what Uitgeverij Fosfor, the client of this application, actually needs) and, of course, EPUB (i.e., now that one can open an EPUB file, i.e., extract its contents, it should also be possible to turn the contents back into an EPUB file again, which is also something I've been able to do in an earlier version so need to reimplement that).

And then the first release of Fosfor will be ready. When? Not sure... can anyone out there help with this free and open source project (https://java.net/projects/epubopentoolbox), especially with solving the XML export request? (This can probably help somehow.) One cool thing is that Fosfor is built on Maven so any IDE should be usable when developing this tool, assuming the IDE has good Maven support.

Join the discussion

Comments ( 1 )
  • Thierry Monday, May 12, 2014

    This is a very interesting tool

    for the conversion a way to go is to use the calibre command line interface to make the conversion (http://manual.calibre-ebook.com/cli/cli-index.html). I don't know if there is the exact xml format as you expect.

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.