In Part 1 of a series of articles regarding the JPedal Version 5.X update we explore the big changes that this update will bring.
As we mentioned a few weeks ago on this blog, April will see the release of Version 5 of our JPedal PDF library, which will contain version 3 of our JBIG2 decoder.
JBIG2 is a format for encoding bi-level (which usually means black and white) images. When writing our PDF library, we realised that none of the standard Java libraries – or any other Java libraries – could handle JBIG2 data, so we developed our own in 2008 and released it under a BSD license.
That was a long time ago now, but we followed it up in 2010 with version 2, which included a bunch of fixes and massive speed improvements. Unlike version 1, we kept it in-house as an exclusive part of our PDF library. Version 1 is still used by some of our competitors – we occasionally get bug reports from users complaining the images work in our viewer but not theirs. (We recommend a simple fix for this!)
With version 3 we set ourselves 3 main targets:-
1. More speed.Back in 2008 we were maintaining compatibility with Java 1.4. Java’s come a long way since then, and we’ve taken advantage of the new features to make our code cleaner and faster. We’ve also continued profiling to find and deal with bottlenecks.
2. More robust. We have seen an increasing number of PDF files where the JBIG2 data is unusual, incorrect or corrupt. We have added a lot of code to recover from these issues as elegantly as possible.
3. More comprehensive. JBIG2 is a complex format, and the specification has a lot of rarely used features. As we’ve come across more files we’ve been able to add support for more of these – in this release we’ve added support for custom Huffman tables, which is an increasingly popular technique for better compressing the image data.
We are very pleased with the results. Again, we’ve kept these changes in-house and we hope you find them worthwhile in the next update.
Latest posts by Sam Howard (see all)
- PDF to HTML5’s Holy Grail – Vertical positioning for PDF fonts - October 8, 2015
- WOFF 2.0: What is it, why is it coming, and what’s next? - April 2, 2015
- Web fonts: A quick introduction to Wrapper and Glyph formats - February 27, 2015
- 5 tips for using fonts in HTML5 - January 29, 2015
- A Beginners introduction to Unicode - December 4, 2014