SourceForge Project Page

EAN-13

Example

Example EAN-13 symbol

Structure

The configuration for the default implementation is:

<barcode>
  <ean-13>
      <height>{length:15mm}</height>
      <module-width>{length:0.33mm}</module-width>
      <quiet-zone enabled="{boolean:true}">{length:10mw}</quiet-zone>
      <checksum>{checksum-mode:auto=add|check}</checksum>
      <human-readable>
        <placement>{human-readable-placement:bottom}</placement>
        <font-name>{font-name:Helvetica}</font-name>
        <font-size>{length:8pt}</font-size>
      </human-readable>
  </ean-13>
</barcode>

Message format

  • Valid characters are 0-9
  • Message length must be 12 or 13 characters depending on the checksum mode.
  • Behaviour when checksum-mode is set to auto: If a 12-character message is passed in, the check character is added. If a 13-character message is passed in, the check character is checked.
  • Supplementals are supported (2 and 5 characters). You can add them by appending a "+" along with the supplemental message to the barcode message. Example: 9783468111242+56789