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.

Code tidy in 5.0 release

1 min read

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

We have had to make some major changes for our XFA support so we decided to take the opportunity to have a big code tidy. Specifically we have focused on THESE objectives:-

1. Hunting down and removing dead code which is no longer used. This has also included removing Method parameters which are not being used.

2. Tidying up and improving the way we allow users to access Forms. We have incrementally added some convenience methods on an adhoc basis which we wanted to replace with a simple, powerful way to access Forms which will adapt well to future enhancements. This has resulted in a couple of API changes which we will be documenting.

3. Take advantage of newer Java features. Java6 is now our base level so we have taken advantage of Java5/6 features in the code and Annotations to improve the code and make it easier to develop in the future.

4. Move away from Swing.  There are now alternatives to Swing and we have customers using the code where Swing is not needed. So we wanted to provide compatibility, but move away from Swing.

In particular we wanted a new version of PdfDecoder (PdfBaseDecoder) which does not use Swing and can be used for PDF 2 Image, Text extraction, Text search and low level manipulation. The Swing version will remain for backwards compatibility and viewing (and there is currently no real non-Swing way to print from Java until JavaFX support appears).

5. Better document the API. We will add a class Api.java which lists all the methods we recommend you can use so you can instantly see any changes and we can document fully.

As these changes may effect customers, we will start making available daily builds of  the Version 5.0 release available next week for customers to try and feedback on before the final release. New XFA support will not be enabled by JBig2 updates will be included.

Please let us have your feedback…

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 (Twitter, Facebook and Google+) or the  Blog RSS.

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 *