AztecCodeErrorCorrectionLevel Enum
Lists the amount of redundancy built into the Aztec Code to compensate for calculation errors.
Declaration
public enum AztecCodeErrorCorrectionLevel extends Enum<AztecCodeErrorCorrectionLevel> implements IIntEnum
Members
| Name | Description |
|---|---|
LEVEL_1
|
Up to 10% of symbol capacity, plus 3 codewords for error correction. |
LEVEL_2
|
Up to 23% of symbol capacity, plus 3 codewords for error correction. |
LEVEL_3
|
Up to 36% of symbol capacity, plus 3 codewords for error correction. |
LEVEL_4
|
Up to 50% of symbol capacity, plus 3 codewords for error correction. |
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 an Aztec 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 {
AztecCodeOptions options = AztecCodeOptionsBuilder.create()
.withCompactionMode(AztecCodeCompactionMode.TEXT)
.withErrorCorrectionLevel(AztecCodeErrorCorrectionLevel.LEVEL_2)
.withVersion(AztecCodeVersion.AUTO_VERSION)
.withModuleSize(5)
.withShowText(false)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("aztec.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"https://www.devexpress.com/try",
fileStream,
DXImageFormat.getPng());
}
}
}
Refer to the following help topic for additional information: Aztec Code.