Version 5 release – Swing and javaFX

In Part 5 of a series of articles regarding the JPedal Version 5.X update we explore the big changes that this update will bring.

A lot has changed in the Java world since we started writing our Java PDF library. As developers we try to steer a careful middle course between not changing anything and updating to remain current. With Java versions, that means testing on the latest Java versions (currently Java 7 and you will see we have been testing with Nashorn) and supporting previous versions (currently Java 6 which was released in 2006 and is no longer supported by Oracle).

When we created the original JPedal, it was a pure viewer so we created it to extend JPanel. This provided a clean, simple component we called PdfDecoder. We built a totally configurable Java PDF Viewer around this but clients can still use PdfDecoder directly if they prefer.

This worked very well for its purpose but we have an increasing number of users using it for lots of other purposes which do not require Swing (PDF to image conversion, text extraction and search, etc). We have also altered the way the code works internally so it makes much less use of Swing Forms than the original.

With our version 5.0 release, we needed to change some features for XFA and enhanced JavaScript support. We decided to take the opportunity to look at what other major revisions might be worthwhile.

So we have created a new version (PdfDecoderServer). This does not include any of the Swing functionality (no printing – which needs Swing – or viewing and no PDF to  Graphics2D rendering).

You can still use PdfDecoder for everything but if you just want these ‘server’ functions, PdfDecoderServer is available (and should be quicker and use less memory). Both PdfDecoder and PdfDecoderServer now implement PdfDecoderInt with common methods in the Interface.

We did consider renaming PdfDecoder to something like  PdfSwingDecoder, but this would mean customers need to alter their code extensively. So we have kept it as it was.

Oracle have made it clear that the future of Display in Java is JavaFX. Swing will continue in Java but will not see updates. We have already started adding in JavaFX features to our Viewer (the PageFlow mode shows off what JavaFX can do). We have some more in the pipeline for later releases this year. And obviously we might create a PdfDecoderJavaFX in the future. Let’s just say we have some very exciting future plans and we are always interested in any customer suggestions…

In the meantime, we hope we have steered that middle course of keeping up to date, keeping good backward compatibility and allowing for future enhancements in our monthly releases.

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (TwitterFacebook and Google+) or the Blog RSS.

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>