Matrix2of5Options Class
Contains options specific to the Matrix 2 of 5 symbology.
Declaration
public class Matrix2of5Options extends Industrial2of5Options
Remarks
Refer to the following help topic for additional information: Matrix 2 of 5.
The following code snippet creates a Matrix 2 of 5 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 {
Matrix2of5Options options = Matrix2of5OptionsBuilder.create()
.withCalculateChecksum(true)
.withWideNarrowRatio(3)
.withPadding(new Padding(10))
.withShowText(true)
.withWidth(600)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("matrix2of5.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"12345670",
fileStream,
DXImageFormat.getPng());
}
}
}
Inherited Members
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Inheritance
Object
JavaObject
BarcodeOptions
Industrial2of5Options
Matrix2of5Options
Matrix2of5Options()
Initializes a new instance of the Matrix2of5Options class.
Declaration
public Matrix2of5Options()