Reading support for HTML and EML files is included in the following Imaging SDK products:

  • Imaging SDK for the Java Platform

Currently, RasterMaster Software does not provide HTML/EML reading support in Macintosh products.

Preparation

In order to enable this feature you will need to prepare your system.

Windows

RasterMaster uses the Accusoft-modified open-source cef-pdf program to perform HTML conversion. This program is extracted at runtime, either to the temporary directory (default), or to a user-specified directory. This extraction directory can be specified via Snowbnd.IMGLOW_setHtmlExtractionPath. Your application must be able to read and write to this directory.

The above code only needs to be executed once for the lifetime of your Java program.

Now, RasterMaster will be able to detect and convert HTML/EML files.

Linux

RasterMaster uses the Accusoft-modified open-source cef-pdf program to perform HTML conversion. This program must be downloaded and extracted to a user-specified directory before using the toolkit. The full archive can be downloaded here. Extract the contents to a directory and make the cef-pdf file executable using chmod +x cef-pdf. This directory can be specified via Snowbnd.IMGLOW_setHtmlExtractionPath. Your application must be able to read from, write to, and execute programs from this directory.

Your system will need to have prerequisites for Chromium Embedded Framework installed. On Ubuntu these include…

libxdamage1
libgbm-dev
libxkbcommon-x11-0 
libpangocairo-1.0-0

These programs can be installed using apt. For the full list, see Chromium Dependencies.

If your system is running without a display, you may need to configure a virtual framebuffer using xvfb. You can achieve this by running a command such as the following…

Xvfb -ac :99 -screen 0 1024x768x24 &
DISPLAY=:99

where :99 refers to an arbitrary number and 1024x768x24 specifies the frame buffer width, height, and depth. This command will need to be executed before using the toolkit to convert HTML files. This program can be installed on Ubuntu using apt install xvfb.

Now, RasterMaster will be able to detect and convert HTML/EML files.

Reading and Decompressing

To read/decompress a HTML or EML file, use any of the decompression calls such as IMG_decompress_bitmap(String, int). All Imaging SDK products automatically detect the file format and do not use the extension on the file name.