PNG JPG BMP TIFF SVG
Aspose.BarCode  for Java
Aztec

إنشاء ملصقات Aztec باستخدام Java

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

How to Generate رمز Aztec Using Java

لإنشاء رمز Aztec ، احصل على [Aspose.BarCode for Java] ( https://products.aspose.com/barcode/java/ ) API ، واجهة برمجة تطبيقات برمز شريطي غنية وقوية وسهلة الاستخدام لجافا- المنصات القائمة. قم بتنزيل أحدث إصدار مباشرة من [Maven] ( https://repository.aspose.com/webapp/#/artifacts/browse/tree/General/repo/com/aspose/aspose-barcode ) ثم قم بتثبيته داخل Maven- مشروع قائم على أساس إضافة التكوينات التالية إلى pom.xml:

Repository

<repository>
    <id>AsposeJavaAPI</id>
    <name>Aspose Java API</name>
    <url>https://repository.aspose.com/repo/</url>
</repository>

Dependency

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-barcode</artifactId>
    <version>version of aspose-barcode API</version>
    <classifier>jdk17</classifier>
</dependency>

خطوات إنشاء رمز Aztec في Java

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

  • إنشاء كائن جديد لفئة BarCodeGenerator
  • تحديد رمز Aztec وأنواع الباركود الأخرى المطلوبة كمعامل EncodeTypes
  • تحديد نص الإدخال باستخدام طريقة setCodeText
  • استخدم طريقة BarCodeGenerator.save لحفظ صورة الرمز الشريطي التي تم إنشاؤها

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

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

  • Microsoft Windows أو Linux أو أي نظام تشغيل متوافق مع Java Runtime Environment لتطبيقات JSP / JSF وتطبيقات سطح المكتب
  • بيئة تطوير Java ، مثل JRE 1.6 أو أعلى
  • Java Development version JSE2 7.0 أو أعلى

Code to be executed - Java


// Create an instane of the BarcodeGenerator class
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Aztec);

// Specify the code text
generator.setCodeText("");

// Specify the X-dimension 
// the smallest width of the unit of BarCode bars or spaces
generator.getParameters().getBarcode().getXDimension().setMillimeters(2);

// Set codetext position
generator.getParameters().getBarcode().getCodeTextParameters().setLocation(CodeLocation.Below);

// Generate image
generator.generateBarCodeImage();
Generation result