Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Generate Barcodes in C++ Applications
Developers can generate barcode images on the back end programmatically rather than just showing them on Windows or WebForms. This requirement can be because of the following reasons:
There can be plenty of other reasons for working with barcodes on the back end which depend upon the developer’s requirements. Aspose.BarCode provides a Non-GUI based class, BarcodeGenerator that serves the purpose. Developers can create an instance of this class, set some properties and then save the barcode image to any location according to their customized settings. Please, review the example below to have a better idea.
// The path to the documents directory. | |
System::String dataDir = RunExamples::GetDataDir_ManageBarCodes(); | |
// Instantiate barcode object and set differnt barcode properties | |
System::SharedPtr<BarcodeGenerator> generator = [&] { auto tmp_0 = System::MakeObject<BarcodeGenerator>(EncodeTypes::Code128, u"1234567"); tmp_0->get_Parameters()->get_Barcode()->get_XDimension()->set_Millimeters(1.0f); return tmp_0; }(); | |
// Save the image to your system and set its image format to Jpeg | |
generator->Save(dataDir + u"barcode-codetext_out.jpg", BarCodeImageFormat::Jpeg); | |
System::Console::WriteLine(System::Environment::get_NewLine() + u"Barcode saved at " + dataDir + u"barcode-codetext_out.jpg"); |
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.