Barcode-Lib4J requires Java 11+
Package de.vwsoft.barcodelib4j.oned
Java Class «ImplCode39» – Barcode «Code 39»
java.lang.Object
de.vwsoft.barcodelib4j.oned.Barcode
de.vwsoft.barcodelib4j.oned.ImplCode39
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ImplCode39E,ImplPZN,ImplPZN8
Implementation of Code 39 (also known as Code 3 of 9). To create instances, use one of the
newInstance static methods in the Barcode class.
Code 39 is an alphanumeric barcode format that is widely used in applications such as inventory management and tracking. It is capable of encoding:
- Upper case letters (A-Z)
- Digits (0-9)
- Space character
- Special characters: plus (+), minus (-), dollar ($), slash (/), period (.), percent (%)
-
Method Summary
Modifier and TypeMethodDescriptionvoidsetContent(String content, boolean autoComplete, boolean appendOptionalChecksum) Sets the content to be encoded in the barcode.Methods inherited from class de.vwsoft.barcodelib4j.oned.Barcode
clone, draw, draw, draw, getAddOn, getContent, getFont, getRatio, getText, getTextOffset, isFontSizeAdjusted, isTextOnTop, isTextVisible, newInstance, newInstance, setAddOn, setCustomText, setFont, setFontSizeAdjusted, setRatio, setTextOffset, setTextOnTop, setTextVisible, supportsAddOn, supportsAutoCompletion, supportsCustomText, supportsTextOnTop
-
Method Details
-
setContent
public void setContent(String content, boolean autoComplete, boolean appendOptionalChecksum) throws BarcodeException Sets the content to be encoded in the barcode.The content is validated against the allowed character set. If
autoCompleteis enabled, lowercase letters are automatically converted to uppercase. IfappendOptionalChecksumis enabled, a modulo 43 checksum is calculated and appended.- Specified by:
setContentin classBarcode- Parameters:
content- the content to be encoded in the Code 39 barcodeautoComplete- whether to convert lowercase letters to uppercase lettersappendOptionalChecksum- whether to append an optional modulo 43 checksum- Throws:
BarcodeException- if the content is empty or contains invalid characters
-