Fosfor EPUB Reader

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.


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.

Posted by alex on June 11, 2014 at 06:35 AM PDT #

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 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.

Posted by Geertjan on June 11, 2014 at 08:04 AM PDT #

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

Posted by alex on June 12, 2014 at 05:07 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016