MicroQRCodeCompactionMode Enum
Lists the values that specify the type of data encoded in the Micro QR Code.
Declaration
public enum MicroQRCodeCompactionMode extends Enum<MicroQRCodeCompactionMode> implements IIntEnum
Members
| Name | Description |
|---|---|
ALPHA_NUMERIC
|
A combination of letters, numbers, and special characters, up to 21 characters. |
BYTE
|
Binary data is encoded. Maximum 15 bytes. |
NUMERIC
|
Numeric data is encoded. Maximum 35 digits. |
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 Micro QR Code 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 {
MicroQRCodeOptions options = MicroQRCodeOptionsBuilder.create()
.withCompactionMode(MicroQRCodeCompactionMode.BYTE)
.withErrorCorrectionLevel(MicroQRCodeErrorCorrectionLevel.AUTO)
.withPadding(new Padding(10))
.withShowText(false)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("microQRcode.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"DXv26.1",
fileStream,
DXImageFormat.getPng());
}
}
}
Refer to the following help topic for additional information: Micro QR Code.