Skip to main content

QRCodeGS1Options Class

Contains options specific to QR Code GS1 symbology.

Declaration

public class QRCodeGS1Options extends QRCodeOptions

Remarks

Refer to the following help topic for additional information: GS1 QR Code.

The following code snippet creates a GS1 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 {

        QRCodeGS1Options options = QRCodeGS1OptionsBuilder.create()
            .withErrorCorrectionLevel(QRCodeErrorCorrectionLevel.H)
            .withCompactionMode(QRCodeCompactionMode.AUTO)
            .withIncludeQuietZone(true)
            .withVersion(QRCodeVersion.VERSION_20)
            .withModuleSize(50)
            .withPadding(new Padding(10))
            .withShowText(false)
            .withWidth(600)
            .build();

        Path outputDir = Path.of("output");
        Files.createDirectories(outputDir);

        try (FileOutputStream fileStream = new FileOutputStream(
                outputDir.resolve("qrcodeGS1.png").toFile());
                BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
                    barcodeGenerator.export(
                            "(01)09506000134352(17)260630(2026)https://www.devexpress.com",
                            fileStream,
                            DXImageFormat.getPng());
        }
    }
}

Inherited Members

com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.memberwiseClone()
com.devexpress.system.JavaObject.toString()
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)

Inheritance

Object
JavaObject

QRCodeGS1Options()

Initializes a new instance of the QRCodeGS1Options class.

Declaration

public QRCodeGS1Options()

Methods

getFNC1Substitute() Method

Returns a substring/character that serves as the placeholder for the FNC1 functional character.

Declaration

public String getFNC1Substitute()

Returns

Type Description
String

The symbols to be replaced.

setFNC1Substitute(String value) Method

Specifies a substring or character used as a placeholder for the FNC1 functional character in GS1 QR Code input data.

Declaration

public void setFNC1Substitute(String value)

Parameters

Name Type Description
value String

The placeholder for the FNC1 functional character in GS1 QR Code input data.