PDF417CompactionMode Enum
Lists values that indicate the data type coded into a PDF417 barcode.
Declaration
public enum PDF417CompactionMode extends Enum<PDF417CompactionMode> implements IIntEnum
Members
| Name | Description |
|---|---|
BINARY
|
The byte array is coded into the PDF417 barcode. |
TEXT
|
The text data is coded into the PDF417 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 PDF417 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 {
PDF417Options options = PDF417OptionsBuilder.create()
.withColumns(3)
.withTruncateSymbol(false)
.withErrorCorrectionLevel(PDF417ErrorCorrectionLevel.LEVEL_2)
.withCompactionMode(PDF417CompactionMode.TEXT)
.withPadding(new Padding(10))
.withShowText(true)
.withWidth(600)
.withHeight(200)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("pdf417 .png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
"PDF417 DEMO 1234567890",
fileStream,
DXImageFormat.getPng());
}
}
}
Refer to the following help topic for additional information: PDF417.