PNG JPG BMP TIFF SVG
Aspose.BarCode  for C++
Postnet

إنشاء ملصقات Postnet باستخدام C++

أنشئ Postnet الرمز الشريطي في C++ باستخدام Aspose.BarCode من جانب الخادم لواجهة برمجة تطبيقات C++.

How to Generate Postnet الرمز الشريطي Using C++

لإنشاء Postnet الرمز الشريطي ، ثبّت [Aspose.BarCode for C ++] ( https://products.aspose.com/barcode/cpp/ ) API ، مكتبة باركود قوية وسهلة الاستخدام مع وظائف غنية لأنظمة C ++ . قم بتنزيل أحدث إصدار مباشرة من مدير الحزم [NuGet] ( https://www.nuget.org/packages/aspose.barcode) : ابحث عن ** Aspose.BarCode.Cpp ** ثم ثبّت الحزمة. بدلاً من ذلك ، افتح وحدة تحكم مدير الحزم وقم بتشغيل الأمر التالي:

Command

  PM> Install-Package Aspose.BarCode.Cpp

خطوات إنشاء Postnet الرمز الشريطي في C++

يسهّل Aspose.BarCode للمطورين إنشاء صور Postnet الرمز الشريطي ببضعة أسطر من التعليمات البرمجية.

  • إنشاء كائن من فئة BarcodeGenerator
  • تمرير Postnet الرمز الشريطي كمعامل
  • أدخل نص الإدخال لترميزه كمعامل ثاني
  • حدد أبعاد الصورة إذا لزم الأمر
  • اتصل بأسلوب BarcodeGenerator.Save لتنزيل Postnet الرمز الشريطي الرمز الشريطي

متطلبات النظام

يتم دعم واجهات برمجة تطبيقات الباركود Aspose من قبل جميع المنصات وأنظمة التشغيل الرئيسية. قبل تنفيذ نموذج التعليمات البرمجية أدناه ، يرجى التحقق من تمكين المتطلبات الأساسية التالية في نظامك.

  • Microsoft Windows أو Linux أو أي نظام تشغيل متوافق مع C ++ Runtime Environment لنظام التشغيل Windows 32 بت أو Windows 64 بت أو Linux 64 بت.
  • يشار إلى Aspose.BarCode لـ C ++ DLL في مشروعك

Code to be executed - C++


// Initialize a BarcodeGenerator class object and Set CodeText & Symbology Type
System::SharedPtr<BarcodeGenerator> generator = [&]
{
    auto tmp_0 = System::MakeObject<BarcodeGenerator>(EncodeTypes::Postnet, u"");
    // Set parameters
    tmp_0->get_Parameters()->get_Barcode()->get_XDimension()->set_Millimeters(2);
    tmp_0->get_Parameters()->get_Barcode()->get_CodeTextParameters()->set_Location(Aspose::BarCode::CodeLocation::Below);
    return tmp_0;
}();

// Generate image
System::SharedPtr<System::Drawing::Bitmap> lBmp = generator->GenerateBarCodeImage();
Generation result