UPC-E
Example
Structure
The configuration for the default implementation is:
<barcode> <upc-e> <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> </upc-e> </barcode>
Message format
- Valid characters are 0-9
- Message length must be 7 or 8 characters depending on the checksum mode.
- Behaviour when checksum-mode is set to auto: If a 7-character message is passed in, the check character is added. If a 8-character message is passed in, the check character is checked.
- The first character (number system) must be 0 or 1.
- You can pass in a UPC-A message (12 or 13 characters) to generate a UPC-E barcode. If the UPC-A message cannot be converted to a UPC-E message you'll get an exception.
- Supplementals are supported (2 and 5 characters). You can add them by appending a "+" along with the supplemental message to the barcode message. Example: 0123413+77