Example usage for com.itextpdf.text.pdf BarcodePostnet createImageWithBarcode

List of usage examples for com.itextpdf.text.pdf BarcodePostnet createImageWithBarcode

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf BarcodePostnet createImageWithBarcode.

Prototype

public Image createImageWithBarcode(PdfContentByte cb, BaseColor barColor, BaseColor textColor) 

Source Link

Document

Creates an Image with the barcode.

Usage

From source file:org.unesco.jisis.printsort.BarCodeGenerator.java

/**creating a barcode image using BarcodePostnet for myText*/
public Image createBarcodePostnet(String myText) {
    BarcodePostnet myBarcodePostnet = new BarcodePostnet();
    myBarcodePostnet.setCode(myText);//from   w w w  . j  av  a  2  s .c o m
    Image myBarcodeImagePostnet = myBarcodePostnet.createImageWithBarcode(contentByte, null, null);
    return myBarcodeImagePostnet;
}

From source file:org.unesco.jisis.printsort.BarCodeGenerator.java

/** creating a barcode image using BarCodeInter25 */
public Image createBarcodePostnetPlanet(String myText) {
    BarcodePostnet myBarCodePostnetPlanet = new BarcodePostnet();
    myBarCodePostnetPlanet.setCode(myText);
    myBarCodePostnetPlanet.setCodeType(Barcode.PLANET);
    Image myBarCodeImagePostntPlanet = myBarCodePostnetPlanet.createImageWithBarcode(contentByte, null, null);
    return myBarCodeImagePostntPlanet;
}