Skip to main content

IntelligentMailPackageOptionsBuilder Class

Builds an IntelligentMailPackageOptions object. Chain builder methods to configure barcode settings, then call the build() method to create the options object.

Declaration

public class IntelligentMailPackageOptionsBuilder extends BarcodeOptionsBuilder<IntelligentMailPackageOptions,IntelligentMailPackageOptionsBuilder>

Remarks

Refer to the following help topic for additional information: Intelligent Mail Package (IMpb).

The following code snippet creates an Intelligent Mail Package 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 {

        IntelligentMailPackageOptions options = IntelligentMailPackageOptionsBuilder.create()
            .withPadding(new Padding(10))
            .withShowText(true)
            .withWidth(600)
            .build();

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

        try (FileOutputStream fileStream = new FileOutputStream(
                outputDir.resolve("intelligent-mail-package.png").toFile());
                BarcodeGenerator barcodeGenerator = new BarcodeGenerator(options)) {
                    barcodeGenerator.export(
                            "9205590175547700043210",
                            fileStream,
                            DXImageFormat.getPng());
        }
    }
}

Inherited Members

com.devexpress.system.JavaObject.clone()
com.devexpress.system.JavaObject.equals(java.lang.Object)
com.devexpress.system.JavaObject.hashCode()
com.devexpress.system.JavaObject.initFields()
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
BarcodeOptionsBuilder<TOptions,TBuilder>
IntelligentMailPackageOptionsBuilder

IntelligentMailPackageOptionsBuilder()

Initializes a new instance of the IntelligentMailPackageOptionsBuilder class.

Declaration

public IntelligentMailPackageOptionsBuilder()

Methods

create() Method

Creates a new IntelligentMailPackageOptionsBuilder object.

Declaration

public static IntelligentMailPackageOptionsBuilder create()

Returns

Type Description
IntelligentMailPackageOptionsBuilder

The current IntelligentMailPackageOptionsBuilder instance for method chaining.

withFNC1Substitute(String substitute) Method

Specifies a substring/character that serves as the placeholder for the FNC1 functional character. Returns the builder instance for method chaining.

Declaration

public IntelligentMailPackageOptionsBuilder withFNC1Substitute(String substitute)

Parameters

Name Type Description
substitute String

The symbols to be replaced.

Returns

Type Description
IntelligentMailPackageOptionsBuilder

The current IntelligentMailPackageOptionsBuilder instance for method chaining.