<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.1//EN" "document-v11.dtd">
<document>
  <header>
    <title>EAN-128</title>
  </header>
  <body>
    <p>also known as: UCC/EAN-128, GS1-128</p>
    <!--section id="example">
      <title>Example</title>
      <figure src="../images/example-ean-128.png" alt="Example EAN-128 symbol"/>
    </section-->
    <section id="structure">
      <title>Structure</title>
      <p>The configuration for the default implementation is:</p>
      <source>&#60;barcode&#62;
  &#60;<strong>ean-128</strong>&#62;
      &#60;height&#62;{<link href="barcode-xml.html#length">length</link>:15mm}&#60;/height&#62;
      &#60;module-width&#62;{<link href="barcode-xml.html#length">length</link>:0.21mm}&#60;/module-width&#62;
      &#60;check-digit-marker&#62;{<link href="barcode-xml.html#char">char</link>:&amp;#x00f0}&#60;/check-digit-marker&#62;
      &#60;group-separator&#62;{<link href="barcode-xml.html#char">char</link>:&amp;#x00f1}&#60;/group-separator&#62;
      &#60;template&#62;{<link href="barcode-xml.html#string">string</link>}&#60;/template&#62;
      &#60;quiet-zone enabled="{<link href="barcode-xml.html#boolean">boolean</link>:true}"&#62;{<link href="barcode-xml.html#length">length</link>:10mw}&#60;/quiet-zone&#62;
      &#60;human-readable&#62;
        &#60;placement&#62;{<link href="barcode-xml.html#human-readable-placement">human-readable-placement</link>:bottom}&#60;/placement&#62;
        &#60;font-name&#62;{<link href="barcode-xml.html#font-name">font-name</link>:Helvetica}&#60;/font-name&#62;
        &#60;font-size&#62;{<link href="barcode-xml.html#length">length</link>:8pt}&#60;/font-size&#62;
        &#60;omit-brackets&#62;{<link href="barcode-xml.html#boolean">boolean</link>:false}&#60;/omit-brackets&#62;
      &#60;/human-readable&#62;
  &#60;/<strong>ean-128</strong>&#62;
&#60;/barcode&#62;</source>
    </section>
    <section>
      <title>Notes</title>
      <ul>
        <li>EAN-128 is based on the Code 128 symbology.</li>
        <li>The height should be at least 0.15 times the barcode's length or 0.25 inches.</li>
        <li>
          The "template" value is normally optional. The implementation will attempt to identify
          the correct template by inspecting the AI (application identifier). There's a table
          of predefined application templates built-in.
        </li>
        <li>
          The format of "template" is a repeating set of AI number (in brackets)
          followed by a field description. The allowed data types are "n" (numeric), 
          "an" (alpha-numeric), "d" (date) and "cd" (check digit). "cd" will calculate the
          check digit starting with the first character after the AI. "cd0" will include the AI
          in the check digit calculation (used for USPS). Multiple field parts can be separated
          by "+" characters.
        </li>
        <li>Examples: "n13" defines a numeric
          field with exactly 13 digits. "n13+cd" defines a numeric field with exactly 13 digits plus
          a check digit. "an1-9" defines an alpha-numeric field with 1 to 9 characters.
          An example: "(01)n13+cd(421)n3+an1-9(10)an1-20"
        </li>
        <li>
          "group-separator" defines the group separator character you will use in your message.
          By default, ASCII &lt;GS&gt; (0x1D, 035) or 0xF1 are recognized as group separators. In XSL-FO
          applications 0xF1 may have to be used instead of ASCII &lt;GS&gt;.
        </li>
        <li>
          "check-digit-marker" represents the character in your message you will use as 
          place-holder for a check digit that will be automatically calculated by Barcode4J.
        </li>
        <li>
          If "omit-brackets" is set to true, no brackets will be put around AIs in the 
          human-readable part.
        </li>
      </ul>
    </section>
    <section>
      <title>Message format</title>
      <ul>
        <li>Valid characters: The full 7 bit ASCII (US-ASCII) character set is supported</li>
        <li>
          Functions 1 and 3 may be used. They are encoded as ASCII characters 
          0xF1 (241), 0xF3 (243) in the message.
        </li>
      </ul>
    </section>
    <section id="links">
      <title>Links</title>
      <ul>
        <li><link href="http://www.gs1tw.org/twct/gs1w/download/GS_Section_5-3_V7.pdf">GS1-128 specification</link></li>
        <li><link href="http://www.gs1.ch/Portals/3/2publish/001/1133/Page/5-3%20v7-0.pdf">GS1-128 specification (in German)</link></li>
      </ul>
    </section>
  </body>
</document>

