EPCEncoding Enum
Lists values that indicate the encoding type of an EPC (Electronic Product Code) QR barcode.
Declaration
public enum EPCEncoding extends Enum<EPCEncoding> implements IIntEnum
Members
| Name | Description |
|---|---|
ISO_8859_1
|
The ISO 8859-1 encoding type. |
ISO_8859_10
|
The ISO 8859-10 encoding type. |
ISO_8859_15
|
The ISO 8859-15 encoding type. |
ISO_8859_2
|
The ISO 8859-2 encoding type. |
ISO_8859_4
|
The ISO 8859-4 encoding type. |
ISO_8859_5
|
The ISO 8859-5 encoding type. |
ISO_8859_7
|
The ISO 8859-7 encoding type. |
UTF_8
|
The UTF-8 encoding type. |
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 EPC 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 {
QRCodeEPCOptions options = QRCodeEPCOptionsBuilder.create()
.withTransferAmount(100.50)
.withEPCVersion(EPCVersion.VERSION_1)
.withEPCEncoding(EPCEncoding.UTF_8)
.withBackColor(Color.getLightGray())
.withBIC("BFSWDE33MUC")
.withBeneficiaryName("John Doe")
.withIBAN("DE89370400440532013000")
.withPaymentReference("RF18539007547034")
.withTransferPurpose("CHAR")
.withPadding(new Padding(10))
.withShowText(true)
.withWidth(400)
.build();
Path outputDir = Path.of("output");
Files.createDirectories(outputDir);
try (FileOutputStream fileStream = new FileOutputStream(
outputDir.resolve("qrcodeEPC.png").toFile());
BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
barcodeGenerator.export(
options.getStringData(),
fileStream,
DXImageFormat.getPng());
}
}
}
Refer to the following help topic for additional information: EPC QR Code.