XMLMill - convert xml to pdf with java. Generate PDF from xml/xsl.

XMLMill User Guide

Version: 3.00 Date: January 2nd, 2008
This tutorial is opened in a separate window in order to maximize the legibility of this tutorial.
To return to XMLMill, close this browser window

This page as PDFPrinter friendly pageThis guide (!) as PDF


XMLMill supports following image types:

  • BMP - Windows Bitmap
  • DWG - AutoCAD R13/R14/R2000 DWG File
  • GIF - Compuserve GIF
  • JPG - JPEG Image
  • PCX - PC Paintbrush
  • PNG - PNG Image

BMP - Windows Bitmap

This file format is the MS-Windows standard format. It holds black&white-, 16-color, 256-color and Truecolor images. The palletized 16-color and 256-color images may be compressed via run length encoding. Notice there is also a OS/2-BMP format

XMLMill supports following .pcx formats:

  • 2 colors (1-bit)
  • 16 color (4-bit)
  • 16 color (4-bit-rle)
  • 256 colors (8-bit)
  • 256 colors (8-bit-rle)
  • 256 colors (16-bit)
  • True color (24-bit)
  • True color (32-bit)

DWG - AutoCAD R13/R14/R2000 DWG File

XMLMill is capable of retrieving out of the DWG file the thumbnail image.

XMLMill supports following .dwg formats:

  • Autocad R13 dwg files.
  • Autocad R14 dwg files.
  • Autocad R2000 dwg files.

GIF - Graphics Interchange Format File

GIF stands for Graphics Interchange Format.

XMLMill supports following .gif formats:

  • GIF87a specification.
  • GIF89a specification.

Following formats are accepted:

  • Up to 256 colors using 1 to 8 bits.
  • Transparent GIF images.
  • Interlaced images.
  • Animated images.

JPG - Joint Photographic Experts Group

JPEG has become the most commonly used format for storing photographic images.

The original JPEG standard defind four compression modes: hierarchical, progressive, sequential and lossless. In addition, the modes can have multiple compression modes, as following table shows:

Sequential Progressive Lossless Hierarchical
Huffman Arithmetic Huffman Arithmetic Original Lossless JPEG-LS
8-bit 12-bit 8-bit 12-bit 8-bit 12-bit 8-bit 12-bit

Currently XMLMill supports the 8-bit Huffman Sequential JPEG encoding mode (RGB and CMYK color mode).

  • Almost every JPEG file you are likely to come across will use sequential JPEG with Huffman encoding and 8-bit sample data.

PCX - PC Paintbrush

The .pcx file format was developed by the ZSoft Corporation for the PC Paintbrush program in the early 80's. It is a very simple format that uses Run Length Encoding (RLE) to compress the image data.

XMLMill supports following .pcx formats:

  • 2 colors (1-bit)
  • 16 color (4-bit)
  • 256 colors (8-bit)
  • True color (24-bit)

PNG Images

PNG stands for Portable Network Graphics.

XMLMill supports following .png formats:

Supported color-types:

  • grayscale.
  • grayscale + alpha-channel.
  • color palettes.
  • rgb.
  • rgb + alpha-channel.

Supported bitdepths (depending on image's color-type):

  • 1 bit.
  • 2 bit.
  • 4 bit.
  • 8 bit.
  • 16 bit.


XMLMill can handle PNG files with special features like:

  • interlacing (Adam-7).
  • gamma-support.
  • transparency.

XMLMill has been tested with the PNG Suite from Willem van Schaik and you should have no problem in using any PNG image.

  • In case you have PNG images not supported by XMLMill, please let us know (support@xmlmill.com) so we can investigate this (and send you a patch).


[001] <img 

Image processing

XMLMill is optimized the way images are read from a file, stored in memory and written to the PDF document:

Reading an image

The speed images are written to the PDF document has been optimized. Performance increase from 10 to 50 % should be possible compared with versions of XMLMill prior to release 1.35.

Memory storage

No more than one image will be held in memory at a time. An image will only be in memory the time the image is written to the PDF document. The memory occupied will be released once the image is written in the stream. As a result XMLMill is suited to generate documents with a huge numbers of images.

Writing to the PDF document

The bytes are immediately compressed so huge image files will consume considerably less space (up to 90% compression - depending on image type). Also each image is only written once to the .pdf document, even if it is used more than once (in the document).

Copyright © 2001 - 2012. All rights reserved. XMLMill and XMLMill logo are trademarks of Pecunia Data Systems, bvba.
Powered by Apache CocoonPowered by XMLMill