Geertjan's Blog

  • June 10, 2014

Fosfor EPUB Reader

Geertjan Wielenga
Product Manager

Instead of creating a fullblown NetBeans Platform application for doing WYSIWYG editing for EPUB, similar to Sigil, I decided to focus purely on the very narrow scope of EPUB reading. The scope is narrower and, since the application will be a lot less ambitious and smaller, a pure JavaFX implementation makes sense.

When you somehow get, e.g., buy, an EPUB file, you typically read it on a tablet or mobile device. However, some people in the world, e.g., me, still have laptops. Therefore, I'm creating a small JavaFX application that unzips EPUB files, into a temp directory, and then loads them into a JavaFX WebView.

Arabic support:

For an application like this, simplicity is the most important thing. Very few buttons, very few options, preferably no configuration of anything. Just let the user open the EPUB file and read it, that's it, nothing fancy.

CSS stylesheets and images are correctly read. It's exactly what it looks like, a reader for EPUB files. The back and forward buttons are working and you can also switch to the table of contents.

When it is complete, which it pretty much is right now, publishers of EPUB files can make this small app available from their site, to simplify life for their readers, since it will run easily and well on all operating systems.

Join the discussion

Comments ( 3 )
  • alex Wednesday, June 11, 2014

    One useful thing about reades is they let you annotate the text. I realize that's not as trivial to achieve as this simple reader, but it's not rocket science either (a simple overlay or a split panel will do). You may want to look into adding that to this little app.

    But this super-cool, I had no idea it's that easy for JavaFX to open an EPUB file.

  • Geertjan Wednesday, June 11, 2014

    Well, the opening of the EPUB file is pure Java code (in fact, based on some code in NetBeans IDE for working with NetBeans projects from/to ZIP files). The parsing of EPUB content comes from http://www.siegmann.nl/epublib. JavaFX is nothing more than UI components, i.e., once the EPUB is extracted to a tmp directory, it is loaded into a JavaFX WebView, where JavaFX buttons are the controls for moving forward/back. My point here is that there's no magic, it's just all Java, with JavaFX only being relevant as UI components instead of Java Swing.

  • alex Thursday, June 12, 2014

    Ok, then I got it all wrong the first time. Thanks for clearing it up.

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