C++ Barcode Generator and Scanner Library

Create or Recognize 1D and 2D barcode types as well as Export the generated barcodes to multiple image formats within C++ applications.

  Download Free Trial
Aspose.BarCode for C++

Aspose.BarCode for C++


Aspose.BarCode for C++ library allows the C++ developers to add barcode generation & recognition capabilities to their own applications.

Aspose.BarCode for C++ can export the generated barcodes to a verity of image formats in high quality. Moreover, the developers can easily manipulate the appearance of the generated barcodes such as background color, bar color, image quality, rotation angle, x-dimension, captions, size, resolution and much more.


Advanced Barcode API Features



Save generated barcode images to stream or file


Recognize barcodes from stream or image file


Encode & decode non-english characters in 2D barcodes


Control barcode size & orientation


Rotate barcode images to any angle


Support for linear, 2D & postal symbologies

Supported Barcode Symbologies

Aspose.BarCode for C++ supports for a large number of linear, 2D and postal bar code symbologies.

API supported linear barcode types include:

  • EAN13 (Encode, decode)
  • EAN8 (Encode, decode)
  • UPCA (Encode, decode)
  • UPCE (Encode, decode)
  • Interleaved2of5 (Encode, decode)
  • Standard2of5 (Encode, decode)
  • MSI (Encode, decode)
  • Code11 (Encode, decode)
  • Codabar (Encode, decode)
  • EAN14(SCC14) (Encode, decode)
  • SSCC18 (Encode, decode)
  • ITF14 (Encode, decode)
  • Matrix 2 of 5 (Encode, decode)
  • PZN (Encode, decode)
  • Code128 (Encode, decode)
  • Code39 Extended (Encode, decode)
  • Code39 Standard (Encode, decode)
  • Code93 Extended (Encode, decode)
  • Code93 Standard (Encode, decode)
  • IATA 2 of 5 (Encode, decode)
  • OPC (Encode, decode)
  • GS1Code128 (Encode, decode)
  • ISBN (Encode, decode)
  • ISMN (Encode, decode)
  • ISSN (Encode, decode)
  • ITF6 (Encode, decode)
  • VIN (Encode, decode)
  • Pharmacode (Encode, decode)
  • DatabarOmniDirectional (Encode, decode)
  • DatabarTruncated (Encode, decode)
  • DatabarLimited (Encode, decode)
  • DatabarExpanded (Encode, decode)
  • DatabarStackedOmniDirectional (Encode, decode)
  • DatabarExpandedStacked (Encode, decode)
  • DatabarStacked (Encode, decode)
  • PatchCode (Encode, Decode)
  • Supplement (Decode)

2D barcode types include:

  • PDF417 (Encode, decode)
  • MacroPDF417 (Encode, decode)
  • MicroPDF417 (Encode, decode)
  • CompactPDF417 (Decode)
  • DataMatrix (Encode, decode)
  • Aztec (Encode, decode)
  • QR (Encode, decode)
  • MicroQR (Encode, decode)
  • Italian Post 25 (Encode, decode)
  • GS1DataMatrix (Encode, decode)
  • Code16K (Encode, decode)

Postal barcode types include:

  • Postnet (Encode, decode)
  • Planet (Encode, decode)
  • USPS OneCode (Encode, decode)
  • Australia Post (Encode, decode)
  • Deutsche Post Identcode (Encode, decode)
  • Deutsche Post Leticode (Encode, decode)
  • RM4SCC (Encode, decode)
  • SingaporePost (Encode, decode)
  • AustralianPosteParcel (Encode, decode)
  • SwissPostParcel (Encode, decode)

Add Barcode Processing Features to C++ Applications

Aspose.BarCode for C++ allows the developers to easily add barcode generation & recognition features to their own C++ applications. Barcode generation process only requires the text to encode and the barcode type as well as the resultant image type to store the barcode label. It is really that simple!

Generate barcode of type GS1-128 AI 8102 coupon - C++

// instantiate BarCodeBuilder object and set CodeText & Symbology
System::SharedPtr<BarCodeBuilder> barCodeBuilder = System::MakeObject<BarCodeBuilder>(u"514141100906(8102)03", EncodeTypes::UpcaGs1Code128Coupon);
// save barcode image on disc
barCodeBuilder->Save(dir + u"output.png");

Barcode recognition process is highly optimized for performance, and provides the ability to recognize all supported 1D & 2D barcode types from images, regardless of their orientation or position on image. Furthermore, the C++ Barcode Library can also be used to detect multiple barcodes from one image.

Read barcodes from an image - C++

// load the image from disc while specifying expected barcode type
System::SharedPtr<BarCodeReader> reader = System::MakeObject<BarCodeReader>(dir + u"template.jpg", DecodeType::EAN13);
// read all barcodes
while (reader->Read())
	// process information

Imaging, Rotation & Sizing Support

Aspose.BarCode for C++ allows to manipulate barcode label borders, border colors, style, margins and width. It also provides the ability to modify background color and bar color as well as means to rotate barcode labels at any angle and produce high quality images with anti-aliasing. In addition to this, developers can set customized resolutions for the resultant images while saving them to any of the supported image formats.

Customizing Symbologies & Appearance

Aspose.BarCode for C++ can be used customize the barcodes by specifying different kinds of symbologies, setting code text (data to be encoded) and appearance related properties like font, background color, foreground color as well as alignment and location.


Support and Learning Resources


Aspose.BarCode offers individual Barcode generation and recognition APIs for other popular development environments as listed below: