Generate Swiss Barcode in Java.

Swiss barcode enables automated processing of parcels as they can contain information about a parcel, the sevice offering, and the delivery details. You might want to create Swiss barcode for domestic or international mail in your projects or applications. Accordingly, this article explains how to create a Swiss post mail barcode for domestic or international shipping programmatically in Java.

Swiss Barcode Generator - Java API Configuration

Aspose.BarCode for Java can be used to create or read information from different types of barcodes. You can configure it by accessing the JAR file from the downloads page or configure it from Aspose Repository by pasting the following configurations into the pom.xml file of your application.

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>http://repository.aspose.com/repo/</url>
</repository>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-barcode</artifactId>
    <version>22.11</version>
</dependency>

Create Domestic Swiss Barcode in Java

The steps below explain how to generate a Swiss Barcode for domestic mail programmatically in Java:

  1. Create an object of BarcodeGenerator class.
  2. Specify the dimensions of barcode as the number of pixels.
  3. Save the output Swiss barcode as a JPEG, PNG or any other image format.

The code snippet below shows how to generate a Swiss barcode for domestic mail programmatically in Java:

Generate International Swiss Post Mail Barcode in Java

You can generate an international Swiss post mail barcode programmatically in Java with the following steps.

  1. Instantiate an object of BarcodeGenerator class and specify the EncodeType.
  2. Set the barcode size as the number of pixels.
  3. Save the output Swiss code as a JPG or PNG image.

The following code snippet demonstrates how to generate an international Swiss post mail barcode in Java:

Get a Free License

You may request a free temporary license in order to evaluate the API without any evaluation watermark or limitations.

Conclusion

In this article, you have learned how to create a Swiss post mail barcode programmatically in Java. You can easily generate the barcode for domestic or international mail with a few API calls. Furthermore, the documentation space explains how to work with many other types of barcodes. In case of any ambiguities, you may contact us at forum.

See Also