How to generate standard UPC-A

What settings do we use to generate a standard UPC-A barcode? For example, see: http://www.makebarcode.com/specs/upc_a.html

The default ones generated by Aspose Barcode do not have the same text format. The text should be separated by guard bars, and the checksum should be visible on the far right with the format code on the far left.

I see on Working with Symbologies* that you have some barcodes that look similar. Please help me with the settings.

Thanks for your help.

* http://www.aspose.com/docs/display/barcodenet/Specify+Symbologies+for+Barcodes

Hi Neal,

Thank you for your inquiry.

Please forward us the sample code snippet that you are using and the output file. We need this to reproduce the issue at our end. Share the details, we will investigate the issue and update you with our findings via this forum thread.

Sorry - should have been more specific in my original inquiry:


BarCodeBuilder test = new BarCodeBuilder();
test.CodeText = “01234567890”;
test.EncodeType = Aspose.BarCode.Generation.EncodeTypes.UPCA;

If you start with that code,

barCodeBuilder.Save(Response.OutputStream, imgFormat);

will work fine. However, if you instead do something like:

System.Drawing.Bitmap bmp = barCodeBuilder.GetCustomSizeBarCodeImage(width, height, false);
bmp.Save(Response.OutputStream, imgFormat);

That will give you a different result – not a scaled version of the same result as it should.




Hi Neal,

Thank you for writing us back.

This is to update you that we have investigated the issue at our end. We tried to generate the UPC-A barcode with different width & height. We are able to generate the barcodes successfully. It is recommended to visit the following links for details on custom width, barcode image unit size etc:


Hope that above information helps you to generate the barcode image of custom size. Feel free to contact us in case of any query or comments along with your sample code project demonstrating the issue and details about what is expected as output.