One of the strengths of the PDF file format is its support for lots of different colorspace types. It offers clever indexed modes and supports CMYK, DeviceN, Separation, Lab and other types of colour as well as gray, RGB and black/white. HTML5 still cannot match this range. So how do we handle all these color options?
One of the limitations of Java is that support for colorspaces beyond sRGB is rather limited. So luckily, we have already seen this issue and convert everything into sRGB for the PDF library. So images are converted into sRGB already…
The main issue with images then is that there are different ways to convert images depending on whether speed or precision is more important. I’ll cover that in another article…
Click here to see all the articles in the PDF to HTML5 conversion series.
Do you need to write or read JPEG in Java?
We have an easy guide on how to write JPEG in Java using ImageIO and JDeli.
You can learn how to read/write most of the image files in ImageIO. However, it gives little control over the process.
JDeli is easy to use and offers complete support, so why don't you give a try?