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.
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.
Latest posts by Mark Stephens (see all)
- 4 ways Companies can make remote working successful - December 21, 2017
- My experience of a Turkish bath (visiting Istanbul for DevFest) - November 24, 2017
- My 5 key takeaways from JavaOne 2017 - October 6, 2017
- My notes and pictures from thursday JavaOne 2017 - October 5, 2017
- My notes and pictures from Wednesday JavaOne 2017 - October 5, 2017