QRCodeEPCOptions Class
Contains options specific to QR Code EPC symbology.
Declaration
public class QRCodeEPCOptions extends BarcodeOptions
Remarks
Refer to the following help topic for additional information: EPC QR Code.
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());
}
}
}
Inherited Members
Inheritance
QRCodeEPCOptions()
Initializes a new instance of the QRCodeEPCOptions class.
Declaration
public QRCodeEPCOptions()
Methods
getBeneficiaryName() Method
Gets the name of the beneficiary.
Declaration
public String getBeneficiaryName()
Returns
| Type | Description |
|---|---|
| String | The name of the beneficiary. |
getBIC() Method
Gets the BIC (Bank Identifier Code) of the bank account to which the payment is made.
Declaration
public String getBIC()
Returns
| Type | Description |
|---|---|
| String | The BIC of the bank account. |
getEPCEncoding() Method
Gets the EPC encoding type.
Declaration
public EPCEncoding getEPCEncoding()
Returns
| Type | Description |
|---|---|
| EPCEncoding | The EPC encoding type. |
getEPCVersion() Method
Gets the EPC version.
Declaration
public EPCVersion getEPCVersion()
Returns
| Type | Description |
|---|---|
| EPCVersion | The EPC version. |
getFrameOptions() Method
Returns the frame options for the QR Code EPC barcode.
Declaration
public QRFrameOptions getFrameOptions()
Returns
| Type | Description |
|---|---|
| QRFrameOptions | An object that contains frame options. |
getIBAN() Method
Gets the IBAN (International Bank Account Number) of the beneficiary.
Declaration
public String getIBAN()
Returns
| Type | Description |
|---|---|
| String | The IBAN of the beneficiary. |
getIncludeQuietZone() Method
Returns whether to include a quiet zone (a margin of empty space) around the code.
Declaration
public boolean getIncludeQuietZone()
Returns
| Type | Description |
|---|---|
| boolean |
|
getInformation() Method
Gets the additional information to be encoded in the QR code.
Declaration
public String getInformation()
Returns
| Type | Description |
|---|---|
| String | The additional information. |
getLogo() Method
Gets the logo image.
Declaration
public DXImage getLogo()
Returns
| Type | Description |
|---|---|
| DXImage | The logo image. |
getPaymentReference() Method
Gets the payment reference to be encoded in the QR code.
Declaration
public String getPaymentReference()
Returns
| Type | Description |
|---|---|
| String | The payment reference. |
getRemittanceInformation() Method
Gets the remittance information to be encoded in the QR code.
Declaration
public String getRemittanceInformation()
Returns
| Type | Description |
|---|---|
| String | The remittance information. |
getStringData() Method
Gets the credentials data encoded in the QR code as a string.
Declaration
public String getStringData()
Returns
| Type | Description |
|---|---|
| String | The credentials data encoded in the QR code. |
getTransferAmount() Method
Gets the transfer amount to be encoded in the QR code.
Declaration
public @Nullable Double getTransferAmount()
Returns
| Type | Description |
|---|---|
The transfer amount. |
getTransferPurpose() Method
Gets the transfer purpose to be encoded in the QR code.
Declaration
public String getTransferPurpose()
Returns
| Type | Description |
|---|---|
| String | The transfer purpose. |
getVersion() Method
Gets the QR code version.
Declaration
public QRCodeVersion getVersion()
Returns
| Type | Description |
|---|---|
| QRCodeVersion | An enumeration value that specifies the QR code version. |
setBeneficiaryName(String value) Method
Sets the beneficiary’s name.
Declaration
public void setBeneficiaryName(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The name of the beneficiary. |
setBIC(String value) Method
Sets the BIC (Bank Identifier Code) of the beneficiary’s bank account.
Declaration
public void setBIC(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The BIC of the beneficiary’s bank account. |
setEPCEncoding(EPCEncoding value) Method
Specifies the character encoding used in the EPC payload.
Declaration
public void setEPCEncoding(EPCEncoding value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | EPCEncoding | The character encoding used in the EPC payload. |
setEPCVersion(EPCVersion value) Method
Specifies the EPC QR Code specification version.
Declaration
public void setEPCVersion(EPCVersion value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | EPCVersion | The EPC QR Code specification version. |
setFrameOptions(QRFrameOptions value) Method
Specifies frame options. The frame is displayed around the QR code.
Declaration
public void setFrameOptions(QRFrameOptions value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | QRFrameOptions | Frame options. |
setIBAN(String value) Method
Sets the beneficiary’s IBAN (International Bank Account Number).
Declaration
public void setIBAN(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The IBAN of the beneficiary. |
setIncludeQuietZone(boolean value) Method
Specifies whether to include a quiet zone around the QR code.
Declaration
public void setIncludeQuietZone(boolean value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | boolean |
|
setInformation(String value) Method
Sets the additional information to encode in the QR code.
Declaration
public void setInformation(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The additional information to encode in the QR code. |
setLogo(DXImage value) Method
Sets the logo image.
Declaration
public void setLogo(DXImage value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | DXImage | The logo image. |
setPaymentReference(String value) Method
Sets the structured payment reference.
Declaration
public void setPaymentReference(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The structured payment reference. |
setRemittanceInformation(String value) Method
Sets the unstructured remittance information to encode in the QR code.
Declaration
public void setRemittanceInformation(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The unstructured remittance information. |
setTransferAmount(@Nullable Double value) Method
Sets the amount of the SEPA credit transfer.
Declaration
public void setTransferAmount(@Nullable Double value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | The amount of the SEPA credit transfer. |
setTransferPurpose(String value) Method
Sets the transfer purpose to be encoded in the QR code.
Declaration
public void setTransferPurpose(String value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | String | The transfer purpose. |
setVersion(QRCodeVersion value) Method
Specifies the QR Code version used to generate the symbol.
Declaration
public void setVersion(QRCodeVersion value)
Parameters
| Name | Type | Description |
|---|---|---|
| value | QRCodeVersion | The QR code version. |