Generate AustraliaPost Barcode with Different Format Control Code Options

Programming Sample

The following code snippet generates a AustraliaPost barcode with standard format control code.

Java

 public class MyAttributes

{

    public static BarCodeAttributes Create(String text, String symbology)

    {

        BarCodeAttributes b = new BarCodeAttributes();

        b.setCodeText(text);

        b.setSymbology(symbology);

        b.setAustraliaPostFormatControlCode(AustraliaPostFormatControlCode.Standard);

        return b;

    }

}

JRXML

 <image hAlign="Center">

<reportElement x="0" y="600"  width="500" height="250" />

<imageExpression class="net.sf.jasperreports.engine.JRRenderable">

   <![CDATA[new com.aspose.barcode.jr.BarCodeRenderer(MyAttributes.Create(

      "12345678", "AustraliaPost")

   )]]>

</imageExpression>

</image>

The above code generates the following image using the standard format control code.

todo:image_alt_text

Image samples using the other format control codes are shown below.

Customer2

todo:image_alt_text

Customer3

todo:image_alt_text

Redirection

todo:image_alt_text

ReplyPaid

todo:image_alt_text

Routing

todo:image_alt_text