<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
  <header>
    <title>Notes on the supported output formats</title>
    <authors>
      <person id="jmaerki" name="Jeremias Märki" email="jmaerki@users.sourceforge.net"/>
    </authors>
  </header>
  <body>
    <section>
      <title>Introduction</title>
      <p>
        This page gives information about the various output formats supported by 
        <strong>Barcode4J</strong> and tells you how to implement additional
        output formats.
      </p>
      <p>
        For information about accessing the various output formats from Java please
        refer to the <link href="embedding.html">Java embedding page</link>.
      </p>
    </section>
    <section>
      <title>SVG</title>
      <p>
        <fork href="ext:svg">SVG</fork> was the first output format supported by 
        this package. At this time, no verification has been performed to ensure 
        that the output generated conforms to every SVG variant (especially SVG 
        profiles basic and tiny). The code was tested with Apache Batik and Adobe 
        SVG Viewer, only. If there are any problems with the output generated
        we'd appreciate to hear about it.
      </p>
      <p>
        The SVG output is configurable to generate namespaced (with and without 
        prefix) and non-namespaced SVG content. The generated document does not 
        contain any schema or DTD declarations.
      </p>
      <p>
        Depending on your needs on the Java side there is support for generating 
        SVG as a W3C DOM or a JDOM. It is very easy to add support for other 
        output methods such as XOM.
      </p>
    </section>
    <section>
      <title>EPS (Encapsulated PostScript)</title>
      <p>
        The EPS output format generates Level 1 PostScript and includes a 
        HiResBoundingBox for exact positioning in the target document. The font
        used in the barcode is expected to be present in the target PostScript
        interpreter.
      </p>
			<note>
				To minimise file size and for performance reasons, the generated EPS 
				files do not contain a bitmap preview. So if you import the EPS file
				into an application (such as Visio) you may not see the barode.
			</note>
    </section>
    <section>
      <title>Bitmap formats (PNG, TIFF, JPEG etc.)</title>
      <p>
        Bitmap formats are supported through the Java2D output support. What bitmap formats
        are supported depends on your environment:
      </p>
      <ul>
        <li>
          JDK 1.3.x only provides support for JPEG output by using the Sun JPEG encoder 
          included in the JDK.
        </li>
        <li>
          JDK 1.4 or later provides the Image I/O API which contains support for JPEG, 
          PNG by default. Additional formats (such as TIFF or BMP) are supported if 
          <fork href="http://java.sun.com/products/java-media/jai/">JAI (Java Advanced Imaging)</fork>
          is present in the classpath (Download the "Image I/O Tools"). Support for these 
          formats is enabled automatically.
        </li>
        <li>
          Additional output formats can be supported by adding ImageIO-compatible codecs or
          by registering additional implementations of the BitmapEncoder interface provided
          by <strong>Barcode4J</strong>. For example, a BitmapEncoder implementation
          could be coded to interface with the older JIMI imaging library available from Sun.
        </li>
      </ul>
      <p>
        By default, bitmaps are generated as grayscale images (8 bit). You can choose to
        enable or disable anti-aliasing for grayscale images. You can also choose to generate
        monochrome images (1 bit). Additionally, you can specify the resolution for the bitmap.
      </p>
      <note>
        Although JPEG output is supported, it is NOT recommended as it is a lossy
        compression format and contrast will suffer and thus degrading the 
        readability of the generated barcode. 
      </note>
    </section>
    <section>
      <title>Java2D (AWT)</title>
      <p>
        The Java2D implementation can be used to embed <strong>Barcode4J</strong>
        in a Java application (such as a report engine, for example). It is also used
        to paint barcodes on bitmap images.
      </p>
    </section>
  </body>
</document>