We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Generate barcode for String DOCTYP BOL using

Hi,

kindly generate barcode for String DOCTYP BOL using

evaluation version and licensed version and send us the generated tiff files.

barcode format is code39.

Regards,

M.Irfan.

Hi Irfan,

Java has no built-in support for directly saving in tiff format, but you can save the barcode as jpeg file and then convert it into tiff using jai library.

The tiff file generated by the code below is attached.

try
{
BarCodeBuilder barcode = new BarCodeBuilder();
barcode.setCodeText("DOCTYP BOL");
barcode.setSymbology(Symbology.CODE39STANDARD);
barcode.save("d:\\temp\\barcode.jpg");

//read the file
RenderedOp img = JAI.create("fileload", "d:\\temp\\barcode.jpg");
//open the output file stream
FileOutputStream stream = new FileOutputStream("d:\\temp\\barcode.tiff");
//wants to store as JPEG
TIFFEncodeParam encParam= new TIFFEncodeParam();
encParam.setCompression(TIFFEncodeParam.COMPRESSION_PACKBITS);
//save to the file as JPEG
JAI.create("encode", img, stream, "TIFF", encParam);
stream.close();
}
catch(Exception ex)
{
System.out.println(ex.getMessage());
}

I have tested with your code.Even if i generate the barcoded image with your code,while detecting that image i am getting an extra junk character.

so kindly use the same code and generate a tiff file using licensed version and send it to us so that we can verify the barcode.

please do this at the earliest as we are getting delayed due to this issue.

thx.

M.IRfan.

Hi Irfan,

We are working on this issue. I also got an extra character while recognizing the barcode. We will fix this asap.

Hi,

So we can ask the customer to go for the purchase since this issue will be soon taken care off ?

pls confirm. thanks.

Irfan.

Hi Irfan,

Sorry for the confusion. Its actually the checksum character that is used for error detection. Please check out http://www.aspose.com/documentation/visual-components/aspose.barcode-for-.net-and-java/use-checksum-and-supplement-data-for-barcodes.html for details.

You can hide the checksum character by calling setEnableChecksum() method during barcode generation.

BarcodeBuilder.setEnableChecksum(false);