CodabarStartStopSymbol Enum
Lists the start/stop symbol used in barcodes.
Declaration
public enum CodabarStartStopSymbol extends Enum<CodabarStartStopSymbol> implements IIntEnum
Members
| Name | Description |
|---|---|
A
|
Uses “A” as the start/stop character for Codabar barcodes. |
B
|
Uses “B” as the start/stop character for Codabar barcodes. |
C
|
Uses “C” as the start/stop character for Codabar barcodes. |
D
|
Uses “D” as the start/stop character for Codabar barcodes. |
NONE
|
Uses no start/stop character for Codabar barcode. |
fromValue(int value)
|
Returns the |
getName()
|
Returns the name of the |
getValue()
|
Returns the integer value associated with the |
toString()
|
Returns the string representation of the |
valueOf(String name)
|
Returns the |
values()
|
Returns an array of all |
Remarks
The following code snippet creates a Codabar barcode and customizes its encoding parameters with the Fluent API:
import com.devexpress.drawing.*;
import com.devexpress.docs.barcode.*;
import com.devexpress.system.drawing.*;
import com.devexpress.docs.Padding;
import java.io.*;
import java.nio.file.*;
public class Main {
public static void main(String[] args) throws Exception {
CodabarOptions options = CodabarOptionsBuilder.create()
.withStartSymbol(CodabarStartStopSymbol.A)
.withStopSymbol(CodabarStartStopSymbol.D)
.withWideNarrowRatio(1.5f)
.withShowText(true)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("codabar.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"12345-67890",
fileStream,
DXImageFormat.getPng());
}
}
}
Refer to the following help topic for additional information: Codabar.