From 8b7528ff9e856e9ae371357e7f01fed15851f4a0 Mon Sep 17 00:00:00 2001 From: Muhammad Adil Date: Wed, 19 Aug 2026 10:21:46 +0000 Subject: [PATCH] Add 1 barcode python tutorials Categories: general Source: AI Search API Tutorials: - How to generate barcode with ECI using Aspose.Barcode Python Auto-generated by Professionalize.Tutorials Agent --- .../_index.md | 256 +++++++++++++++++ .../_index.md | 254 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 258 +++++++++++++++++ .../_index.md | 258 +++++++++++++++++ .../og-image.png | Bin 0 -> 54112 bytes .../_index.md | 259 +++++++++++++++++ .../_index.md | 260 ++++++++++++++++++ .../_index.md | 260 ++++++++++++++++++ .../_index.md | 258 +++++++++++++++++ .../_index.md | 254 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 255 +++++++++++++++++ .../_index.md | 256 +++++++++++++++++ .../_index.md | 260 ++++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 254 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 260 ++++++++++++++++++ .../_index.md | 257 +++++++++++++++++ .../_index.md | 259 +++++++++++++++++ .../_index.md | 257 +++++++++++++++++ 24 files changed, 5929 insertions(+) create mode 100644 barcode/arabic/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/chinese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/czech/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/dutch/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/og-image.png create mode 100644 barcode/french/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/german/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/greek/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/hindi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/hongkong/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/hungarian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/indonesian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/italian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/japanese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/korean/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/polish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/portuguese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/russian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/spanish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/swedish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/thai/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/turkish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md create mode 100644 barcode/vietnamese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md diff --git a/barcode/arabic/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/arabic/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..8820f43ad --- /dev/null +++ b/barcode/arabic/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,256 @@ +--- +category: general +date: 2026-08-19 +description: كيفية إنشاء الباركود باستخدام ECI مع Aspose.Barcode للبايثون. تعلّم كيفية + إضافة بيانات ECI، دمج النص العادي، وحفظ الصورة في دليل واضح واحد. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: ar +lastmod: 2026-08-19 +og_description: كيفية إنشاء الباركود مع ECI باستخدام Aspose.Barcode للبايثون. اتبع + هذا الدليل لتعلم كيفية إضافة بيانات ECI، تخصيص المظهر، وحفظ النتيجة. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: كيفية إنشاء باركود باستخدام ECI باستخدام Aspose.Barcode Python – خطوة بخطوة +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: كيفية إنشاء الباركود مع ECI باستخدام Aspose.Barcode Python +url: /ar/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# كيفية إنشاء باركود باستخدام ECI مع Aspose.Barcode Python + +إذا كنت بحاجة إلى معرفة **كيفية إنشاء باركود** يحتوي على كل من الأحرف العادية والبيانات المشفرة بـ ECI، يوضح هذا الدليل العملية بالكامل. سترى بالضبط **كيفية إضافة أقسام eci**، وضبط الحجم، وكتابة الصورة إلى القرص باستخدام برنامج نصي واحد قابل للتنفيذ. + +يغطي الدرس: + +* استرجاع نسخة مكتبة Aspose.Barcode (اختياري لكنه مفيد للتصحيح). +* بناء سلسلة codetext موسعة تمزج بين الأحرف العادية والـ ECI‑encoded. +* إنشاء مولد باركود لرمز يدعم codetext الموسع. +* تخصيص أبعاد الباركود وحفظ ملف PNG النهائي. + +لا حاجة إلى أي وثائق خارجية؛ انسخ الكود، شغّله، وستحصل على صورة باركود تتضمن أحرف صينية مشفرة بـ ECI 26 (UTF‑8). + +## المتطلبات المسبقة + +قبل أن تبدأ، تأكد من وجود: + +* Python 3.8 أو أحدث مثبت. +* حزمة `aspose-barcode` مثبتة (`pip install aspose-barcode`). +* صلاحية كتابة في المجلد الذي تنوي حفظ ملف PNG فيه. + +إذا كنت تستخدم بيئة افتراضية، فعّلها أولاً للحفاظ على عزل الاعتمادات. + +## الخطوة 1: التحقق من إصدار Aspose.Barcode (اختياري) + +معرفة الإصدار الدقيق للمكتبة يساعد عندما تحتاج إلى الإبلاغ عن أخطاء أو مقارنة الميزات بين الإصدارات. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*لماذا هذا مهم*: يثبت إخراج الإصدار أن وقت التشغيل يتطابق مع الوثائق التي تتبعها. قد تدعم الإصدارات المختلفة قيم ECI مختلفة، لذا فهذه فحص سريع للمنطقية. + +## الخطوة 2: بناء codetext موسع مع أجزاء عادية وECI‑encoded + +توفر Aspose.Barcode الفئة `ExtCodetextBuilder` لدمج البيانات العادية والقطاعات المشفرة بـ ECI. في هذا المثال نمزج سلسلة رقمية مع أحرف صينية. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*شرح*: +* `add_plain_codetext` يضيف بيانات يتعامل معها رمز الباركود كأحرف عادية. +* `add_eci_codetext` يخبر المولد بإضافة مؤشر ECI (هنا **26**، الذي يطابق UTF‑8) قبل النص المقدم. هذا هو بالضبط **كيفية إضافة eci** إلى الباركود. + +يمكنك استدعاء `add_eci_codetext` عدة مرات لتضمين عدة كتل لغات مختلفة. يتعامل المُنشئ مع تسلسلات الهروب المطلوبة تلقائيًا. + +## الخطوة 3: اختيار رمزية تدعم codetext الموسع + +ليس كل نوع باركود يمكنه تخزين قطاعات ECI. Code 128، QR، وData Matrix هي خيارات شائعة. يستخدم المثال Code 128 لأنه مدعوم على نطاق واسع ويعمل جيدًا للبيانات المختلطة أبجديًا رقمية. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*لماذا Code 128؟*: يقبل النطاق الكامل لـ ASCII وتسلسلات الهروب الخاصة بـ ECI التي ينتجها المُنشئ، مما يجعله مثاليًا لسيناريو “كيفية إنشاء باركود” الذي يخلط بين النص العادي والمشفّر. + +## الخطوة 4: ضبط مظهر الباركود + +يمكنك التحكم في الحجم، الارتفاع، الهوامش، والعديد من الجوانب البصرية الأخرى عبر كائن `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*نصيحة*: إذا كنت تخطط لطباعة الباركود، قم بزيادة `x_dimension` و `bar_height` بشكل متناسب للحفاظ على قابلية القراءة عند DPI المستهدف. + +## الخطوة 5: حفظ صورة الباركود + +أخيرًا، اكتب الصورة المُولدة إلى ملف. تدعم Aspose.Barcode صيغ PNG، JPEG، BMP، والعديد من الصيغ الأخرى. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +تأكد من وجود مجلد `output` أو أنشئه باستخدام `os.makedirs("output", exist_ok=True)` قبل استدعاء `save`. + +### النتيجة المتوقعة + +عند فتح `extended_codetext.png`، يجب أن ترى باركود Code 128 يشفّر السلسلة الرقمية `1234567890` متبوعة بالأحرف الصينية “特殊字符”. مسح الباركود باستخدام ماسح حديث يدعم ECI سيعيد السلسلة المختلطة الأصلية. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="باركود تم إنشاؤه باستخدام مثال كيفية إنشاء باركود"} + +## الأسئلة الشائعة والحالات الخاصة + +### ماذا لو احتجت إلى مجموعة أحرف مختلفة؟ + +اختر قيمة ECI المناسبة من جدول ISO/IEC 18004. على سبيل المثال، تمثل ECI 27 مجموعة ISO‑8859‑1 (Latin‑1). استبدل المعرف الرقمي في `add_eci_codetext` وفقًا لذلك. + +### هل يمكنني تضمين أكثر من كتلة ECI واحدة؟ + +نعم. استدعِ `add_eci_codetext` عدة مرات. يضيف المُنشئ رموز التحويل اللازمة بين الكتل، محافظًا على الترتيب الذي تضيفه به. + +### هل يدعم المولد رموز QR مع ECI؟ + +بالطبع. استبدل `barcode.Symbology.CODE_128` بـ `barcode.Symbology.QR` واضبط أي معلمات خاصة بـ QR (مثل مستوى تصحيح الأخطاء) عبر `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### كيف أتعامل مع سلاسل بيانات طويلة جدًا؟ + +بالنسبة للباركودات الخطية مثل Code 128، الحد الأقصى للطول هو حوالي 80 حرفًا عند استخدام codetext الموسع. إذا تجاوزت ذلك، فكر في التحول إلى رمزية ثنائية الأبعاد مثل QR أو Data Matrix، التي يمكنها تخزين آلاف الأحرف. + +## البرنامج الكامل القابل للتنفيذ + +فيما يلي البرنامج الكامل الذي يمكنك نسخه‑لصقه في ملف باسم `generate_extended_barcode.py` وتشغيله مباشرة. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## ماذا يجب أن تتعلم بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات الموضحة في هذا الدليل. كل مورد يتضمن أمثلة شفرة كاملة مع شروحات خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك الخاصة. + +- [كيفية إنشاء صورة باركود مع تخصيص مساحة إضافية باستخدام Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [كيفية إنشاء صورة باركود في Java باستخدام Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [كيفية إنشاء باركود DataMatrix باستخدام Aspose.BarCode لـ .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/chinese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/chinese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..6df1e5be7 --- /dev/null +++ b/barcode/chinese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,254 @@ +--- +category: general +date: 2026-08-19 +description: 如何使用 Aspose.Barcode for Python 生成带 ECI 的条形码。了解如何添加 ECI 数据、混合普通文本并保存图像,一站式清晰指南。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: zh +lastmod: 2026-08-19 +og_description: 如何使用 Aspose.Barcode for Python 生成带 ECI 的条形码。请按照本教程学习如何添加 ECI 数据、自定义外观并保存结果。 +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: 如何使用 Aspose.Barcode Python 生成带 ECI 的条形码 – 步骤指南 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: 如何使用 Aspose.Barcode Python 生成带 ECI 的条形码 +url: /zh/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 使用 Aspose.Barcode Python 生成带 ECI 的条形码 + +如果您需要了解 **如何生成条形码**,其中包含普通字符和 ECI 编码的数据,本指南将展示完整的过程。您将看到如何 **添加 eci** 部分、调整尺寸,并使用一个可运行的脚本将图像写入磁盘。 + +本教程包括: + +* 检索 Aspose.Barcode 库版本(可选,但对调试有帮助)。 +* 构建混合普通字符和 ECI 编码字符的扩展 codetext 字符串。 +* 为支持扩展 codetext 的符号创建条形码生成器。 +* 自定义条形码尺寸并保存最终的 PNG 文件。 + +无需外部文档;复制代码,运行它,您将得到一个包含使用 ECI 26(UTF‑8)编码的中文字符的条形码图像。 + +## 前提条件 + +在开始之前,请确保您已具备以下条件: + +* 已安装 Python 3.8 或更高版本。 +* 已安装 `aspose-barcode` 包(`pip install aspose-barcode`)。 +* 对您打算保存 PNG 文件的文件夹拥有写入权限。 + +如果您使用虚拟环境,请先激活它,以保持依赖的隔离。 + +## 步骤 1:验证 Aspose.Barcode 版本(可选) + +了解确切的库版本有助于在报告错误或比较不同版本的功能时使用。 + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*为什么这很重要*:版本输出确认运行时与您所参考的文档相匹配。不同版本可能支持不同的 ECI 值,因此这是一个快速的合理性检查。 + +## 步骤 2:构建包含普通和 ECI 编码部分的扩展 codetext + +Aspose.Barcode 提供 `ExtCodetextBuilder` 用于连接普通数据和 ECI 编码段。在本示例中,我们将数字字符串与中文字符混合。 + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*说明*: +* `add_plain_codetext` 插入条形码符号视为普通字符的数据。 +* `add_eci_codetext` 告诉生成器在提供的文本前添加 ECI 指示符(此处为 **26**,对应 UTF‑8)。这正是 **如何添加 eci** 数据到条形码的方式。 + +您可以多次调用 `add_eci_codetext` 以嵌入多个不同语言的块。构建器会自动处理所需的转义序列。 + +## 步骤 3:选择支持扩展 codetext 的符号 + +并非所有条形码类型都能存储 ECI 段。Code 128、QR 和 Data Matrix 是常见的选择。示例使用 Code 128,因为它被广泛支持且适用于混合字母数字数据。 + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*为什么选择 Code 128*:它接受完整的 ASCII 范围以及构建器生成的 ECI 转义序列,使其非常适合混合普通和编码文本的 “如何生成条形码” 场景。 + +## 步骤 4:调整条形码外观 + +您可以通过 `parameters` 对象控制尺寸、高度、边距以及许多其他视觉属性。 + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*提示*:如果计划打印条形码,请按比例增加 `x_dimension` 和 `bar_height`,以在目标 DPI 下保持可读性。 + +## 步骤 5:保存条形码图像 + +最后,将生成的图像写入文件。Aspose.Barcode 支持 PNG、JPEG、BMP 等多种格式。 + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +在调用 `save` 之前,请确保 `output` 文件夹存在,或使用 `os.makedirs("output", exist_ok=True)` 创建它。 + +### 预期结果 + +打开 `extended_codetext.png` 时,您应该看到一个 Code 128 条形码,其中编码了数字字符串 `1234567890`,随后是中文字符 “特殊字符”。使用支持 ECI 的现代扫描仪扫描该条形码,将返回原始的混合字符串。 + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="使用生成条形码示例生成的条形码"} + +## 常见问题与边缘情况 + +### 如果需要不同的字符集怎么办? + +从 ISO/IEC 18004 表中选择合适的 ECI 值。例如,ECI 27 代表 ISO‑8859‑1(Latin‑1)。相应地在 `add_eci_codetext` 中替换数值标识符。 + +### 我可以嵌入多个 ECI 块吗? + +可以。多次调用 `add_eci_codetext`。构建器会在块之间插入必要的 ECI 切换代码,保持您添加的顺序。 + +### 生成器是否支持带 ECI 的 QR 码? + +当然。将 `barcode.Symbology.CODE_128` 替换为 `barcode.Symbology.QR`,并通过 `generator.parameters.qr` 调整任何 QR 特定参数(例如错误纠正级别)。 + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### 如何处理非常长的数据字符串? + +对于像 Code 128 这样的线性条形码,在使用扩展 codetext 时最大长度约为 80 字符。如果超过此长度,建议切换到二维符号,如 QR 或 Data Matrix,它们可以存储数千字符。 + +## 完整、可运行的脚本 + +下面是完整的程序,您可以复制粘贴到名为 `generate_extended_barcode.py` 的文件中并直接运行。 + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## 接下来应该学习什么? + +以下教程涵盖与本指南演示的技术密切相关的主题。每个资源都包含完整的可运行代码示例和逐步解释,帮助您掌握更多 API 功能并在自己的项目中探索替代实现方法。 + +- [如何使用 Aspose.BarCode 生成带补充空格自定义的条形码图像](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [如何在 Java 中使用 Aspose.BarCode 生成条形码图像](/barcode/english/java/barcode-rendering-techniques/) +- [如何使用 Aspose.BarCode 为 .NET 生成 DataMatrix 条形码](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/czech/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/czech/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..adbd786b8 --- /dev/null +++ b/barcode/czech/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Jak generovat čárový kód s ECI pomocí Aspose.Barcode pro Python. Naučte + se, jak přidat ECI data, kombinovat prostý text a uložit obrázek v jednom přehledném + návodu. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: cs +lastmod: 2026-08-19 +og_description: Jak generovat čárový kód s ECI pomocí Aspose.Barcode pro Python. Sledujte + tento tutoriál, abyste se naučili, jak přidat ECI data, přizpůsobit vzhled a uložit + výsledek. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Jak vygenerovat čárový kód s ECI pomocí Aspose.Barcode v Pythonu – krok + za krokem +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Jak vygenerovat čárový kód s ECI pomocí Aspose.Barcode v Pythonu +url: /cs/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak generovat čárový kód s ECI pomocí Aspose.Barcode Python + +Pokud potřebujete vědět **jak generovat čárový kód**, který obsahuje jak obyčejné znaky, tak data kódovaná pomocí ECI, tento návod ukazuje celý proces. Uvidíte přesně **jak přidat eci** sekce, upravit velikost a zapsat obrázek na disk pomocí jediného spustitelného skriptu. + +Návod pokrývá: + +* Získání verze knihovny Aspose.Barcode (volitelné, ale užitečné pro ladění). +* Vytvoření rozšířeného řetězce codetext, který kombinuje obyčejné a ECI‑kódované znaky. +* Vytvoření generátoru čárových kódů pro symbologii, která podporuje rozšířený codetext. +* Přizpůsobení rozměrů čárového kódu a uložení finálního PNG souboru. + +Externí dokumentace není potřeba; zkopírujte kód, spusťte jej a získáte obrázek čárového kódu, který obsahuje čínské znaky kódované pomocí ECI 26 (UTF‑8). + +## Požadavky + +Předtím, než začnete, ujistěte se, že máte: + +* Nainstalovaný Python 3.8 nebo novější. +* Nainstalovaný balíček `aspose-barcode` (`pip install aspose-barcode`). +* Oprávnění k zápisu do složky, kam chcete uložit PNG soubor. + +Pokud používáte virtuální prostředí, nejprve jej aktivujte, aby byly závislosti izolovány. + +## Krok 1: Ověřte verzi Aspose.Barcode (volitelné) + +Znalost přesné verze knihovny pomáhá, když potřebujete hlásit chyby nebo porovnávat funkce mezi verzemi. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Proč je to důležité*: Výstup verze potvrzuje, že běhové prostředí odpovídá dokumentaci, kterou používáte. Různé verze mohou podporovat různé hodnoty ECI, takže je to rychlá kontrola. + +## Krok 2: Vytvořte rozšířený codetext s obyčejnými a ECI‑kódovanými částmi + +Aspose.Barcode poskytuje `ExtCodetextBuilder` pro spojení obyčejných dat a ECI‑kódovaných segmentů. V tomto příkladu kombinujeme číselný řetězec s čínskými znaky. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Vysvětlení*: +* `add_plain_codetext` vloží data, která symbologie čárového kódu považuje za běžné znaky. +* `add_eci_codetext` říká generátoru, aby před dodaný text přidal indikátor ECI (zde **26**, který odpovídá UTF‑8). To je přesně **jak přidat eci** data do čárového kódu. + +Můžete volat `add_eci_codetext` vícekrát pro vložení několika různých jazykových bloků. Builder automaticky zpracuje potřebné únikové sekvence. + +## Krok 3: Vyberte symbologii, která podporuje rozšířený codetext + +Ne každý typ čárového kódu může ukládat ECI segmenty. Code 128, QR a Data Matrix jsou běžné volby. Příklad používá Code 128, protože je široce podporován a dobře funguje pro smíšená alfanumerická data. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Proč Code 128?*: Přijímá celý rozsah ASCII a ECI únikové sekvence generované builderem, což ho činí ideálním pro scénář „jak generovat čárový kód“, který kombinuje obyčejný i kódovaný text. + +## Krok 4: Upravit vzhled čárového kódu + +Můžete řídit velikost, výšku, okraje a mnoho dalších vizuálních aspektů pomocí objektu `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: Pokud plánujete tisk čárového kódu, zvyšte `x_dimension` a `bar_height` úměrně, aby byla zachována čitelnost při cílovém DPI. + +## Krok 5: Uložit obrázek čárového kódu + +Nakonec zapište vygenerovaný obrázek do souboru. Aspose.Barcode podporuje PNG, JPEG, BMP a mnoho dalších formátů. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Ujistěte se, že složka `output` existuje, nebo ji vytvořte pomocí `os.makedirs("output", exist_ok=True)` před voláním `save`. + +### Očekávaný výsledek + +Když otevřete `extended_codetext.png`, měli byste vidět Code 128 čárový kód, který kóduje číselný řetězec `1234567890` následovaný čínskými znaky „特殊字符“. Skenování čárového kódu moderním skenerem, který respektuje ECI, vrátí původní smíšený řetězec. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Čárový kód vygenerovaný příkladem jak generovat čárový kód"} + +## Časté otázky a okrajové případy + +### Co když potřebuji jinou znakovou sadu? + +Vyberte vhodnou hodnotu ECI z tabulky ISO/IEC 18004. Například ECI 27 představuje ISO‑8859‑1 (Latin‑1). Nahraďte číselný identifikátor v `add_eci_codetext` odpovídajícím způsobem. + +### Mohu vložit více než jeden ECI blok? + +Ano. Zavolejte `add_eci_codetext` vícekrát. Builder vloží potřebné ECI přepínací kódy mezi bloky a zachová pořadí, ve kterém je přidáte. + +### Podporuje generátor QR kódy s ECI? + +Rozhodně. Nahraďte `barcode.Symbology.CODE_128` za `barcode.Symbology.QR` a upravte případné QR‑specifické parametry (např. úroveň opravy chyb) pomocí `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Jak zacházet s velmi dlouhými řetězci dat? + +Pro lineární čárové kódy jako Code 128 je maximální délka přibližně 80 znaků při použití rozšířeného codetextu. Pokud tuto délku překročíte, zvažte přechod na dvourozměrnou symbologii, jako je QR nebo Data Matrix, která může uložit tisíce znaků. + +## Kompletní spustitelný skript + +Níže je kompletní program, který můžete zkopírovat a vložit do souboru s názvem `generate_extended_barcode.py` a spustit přímo. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Co byste se měli naučit dál? + +Následující tutoriály pokrývají úzce související témata, která navazují na techniky předvedené v tomto návodu. Každý zdroj obsahuje kompletní funkční ukázky kódu s podrobnými vysvětleními, které vám pomohou zvládnout další funkce API a prozkoumat alternativní přístupy k implementaci ve vašich projektech. + +- [Jak generovat obrázek čárového kódu s přizpůsobením doplňkového prostoru pomocí Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Jak generovat obrázek čárového kódu v Javě s Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Jak generovat DataMatrix čárový kód s Aspose.BarCode pro .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/dutch/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/dutch/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..26b97959d --- /dev/null +++ b/barcode/dutch/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,258 @@ +--- +category: general +date: 2026-08-19 +description: Hoe een barcode met ECI te genereren met Aspose.Barcode voor Python. + Leer hoe je ECI-gegevens toevoegt, platte tekst combineert en de afbeelding opslaat + in één duidelijke gids. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: nl +lastmod: 2026-08-19 +og_description: Hoe een barcode met ECI te genereren met Aspose.Barcode voor Python. + Volg deze tutorial om te leren hoe je ECI-gegevens toevoegt, het uiterlijk aanpast + en het resultaat opslaat. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Hoe een barcode met ECI te genereren met Aspose.Barcode Python – stap‑voor‑stap +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Hoe een barcode met ECI te genereren met Aspose.Barcode Python +url: /nl/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hoe een barcode genereren met ECI met Aspose.Barcode Python + +Als je wilt weten **hoe je een barcode genereert** die zowel gewone tekens als ECI‑gecodeerde gegevens bevat, laat deze gids het volledige proces zien. Je ziet precies **hoe je eci**-secties toevoegt, de grootte aanpast en de afbeelding naar schijf schrijft met één enkel, uitvoerbaar script. + +De tutorial behandelt: + +* Het ophalen van de Aspose.Barcode bibliotheekversie (optioneel maar nuttig voor debugging). +* Het bouwen van een uitgebreide codetext‑string die gewone en ECI‑gecodeerde tekens combineert. +* Het maken van een barcode‑generator voor een symbologie die uitgebreide codetext ondersteunt. +* Het aanpassen van de barcode‑afmetingen en het opslaan van het uiteindelijke PNG‑bestand. + +Er is geen externe documentatie nodig; kopieer de code, voer deze uit, en je hebt een barcode‑afbeelding die Chinese tekens bevat gecodeerd met ECI 26 (UTF‑8). + +## Vereisten + +Voordat je begint, zorg ervoor dat je het volgende hebt: + +* Python 3.8 of nieuwer geïnstalleerd. +* `aspose-barcode`-pakket geïnstalleerd (`pip install aspose-barcode`). +* Schrijfrechten voor de map waarin je het PNG‑bestand wilt opslaan. + +Als je een virtuele omgeving gebruikt, activeer deze dan eerst om afhankelijkheden geïsoleerd te houden. + +## Stap 1: Controleer de Aspose.Barcode versie (optioneel) + +Het kennen van de exacte bibliotheekversie helpt wanneer je bugs moet melden of functies tussen releases wilt vergelijken. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Waarom dit belangrijk is*: De versie‑output bevestigt dat de runtime overeenkomt met de documentatie die je volgt. Verschillende versies kunnen verschillende ECI‑waarden ondersteunen, dus het is een snelle sanity‑check. + +## Stap 2: Bouw een uitgebreide codetext met gewone en ECI‑gecodeerde delen + +Aspose.Barcode biedt `ExtCodetextBuilder` om gewone data en ECI‑gecodeerde segmenten samen te voegen. In dit voorbeeld combineren we een numerieke string met Chinese tekens. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Uitleg*: +* `add_plain_codetext` voegt data in die de barcode‑symbologie behandelt als gewone tekens. +* `add_eci_codetext` instrueert de generator om een ECI‑indicator (hier **26**, wat overeenkomt met UTF‑8) vóór de opgegeven tekst te plaatsen. Dit is precies **hoe je eci**‑data aan een barcode toevoegt. + +Je kunt `add_eci_codetext` meerdere keren aanroepen om verschillende taalblokken in te sluiten. De builder verwerkt automatisch de benodigde escape‑sequenties. + +## Stap 3: Kies een symbologie die uitgebreide codetext ondersteunt + +Niet elk barcode‑type kan ECI‑segmenten opslaan. Code 128, QR en Data Matrix zijn veelgebruikte keuzes. Het voorbeeld gebruikt Code 128 omdat het breed ondersteund wordt en goed werkt voor gemengde alfanumerieke data. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Waarom Code 128?*: Het accepteert het volledige ASCII‑bereik en de ECI‑escape‑sequenties die door de builder worden geproduceerd, waardoor het ideaal is voor het “hoe een barcode te genereren” scenario dat gewone en gecodeerde tekst combineert. + +## Stap 4: Pas de barcode‑uiterlijk aan + +Je kunt grootte, hoogte, marges en vele andere visuele aspecten regelen via het `parameters`‑object. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: Als je van plan bent de barcode af te drukken, verhoog dan `x_dimension` en `bar_height` evenredig om de leesbaarheid bij de doel‑DPI te behouden. + +## Stap 5: Sla de barcode‑afbeelding op + +Schrijf tenslotte de gegenereerde afbeelding naar een bestand. Aspose.Barcode ondersteunt PNG, JPEG, BMP en vele andere formaten. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Zorg ervoor dat de `output`‑map bestaat of maak deze aan met `os.makedirs("output", exist_ok=True)` voordat je `save` aanroept. + +### Verwacht resultaat + +Wanneer je `extended_codetext.png` opent, zou je een Code 128 barcode moeten zien die de numerieke string `1234567890` encodeert, gevolgd door de Chinese tekens “特殊字符”. Het scannen van de barcode met een moderne scanner die ECI respecteert, zal de oorspronkelijke gemengde string teruggeven. + +![Barcode gegenereerd met voorbeeld hoe barcode te genereren](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode gegenereerd met voorbeeld hoe barcode te genereren"} + +## Veelgestelde vragen en randgevallen + +### Wat als ik een andere tekenset nodig heb? + +Kies de juiste ECI‑waarde uit de ISO/IEC 18004‑tabel. Bijvoorbeeld, ECI 27 staat voor ISO‑8859‑1 (Latin‑1). Vervang de numerieke identifier in `add_eci_codetext` dienovereenkomstig. + +### Kan ik meer dan één ECI‑blok insluiten? + +Ja. Roep `add_eci_codetext` meerdere keren aan. De builder voegt de benodigde ECI‑wisselcodes tussen de blokken in, waarbij de volgorde die je toevoegt behouden blijft. + +### Ondersteunt de generator QR‑codes met ECI? + +Absoluut. Vervang `barcode.Symbology.CODE_128` door `barcode.Symbology.QR` en pas eventuele QR‑specifieke parameters (bijv. foutcorrectieniveau) aan via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Hoe om te gaan met zeer lange gegevensreeksen? + +Voor lineaire barcodes zoals Code 128 is de maximale lengte ongeveer 80 tekens bij gebruik van uitgebreide codetext. Als je dit overschrijdt, overweeg dan over te schakelen naar een tweedimensionale symbologie zoals QR of Data Matrix, die duizenden tekens kan opslaan. + +## Volledig, uitvoerbaar script + +Hieronder staat het volledige programma dat je kunt kopiëren‑plakken in een bestand genaamd `generate_extended_barcode.py` en direct kunt uitvoeren. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Wat moet je hierna leren? + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids worden gedemonstreerd. Elke bron bevat volledige werkende code‑voorbeelden met stap‑voor‑stap uitleg om je te helpen extra API‑functies onder de knie te krijgen en alternatieve implementatie‑benaderingen in je eigen projecten te verkennen. + +- [Hoe een barcode‑afbeelding te genereren met aanvullende ruimte‑aanpassing met Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Hoe een barcode‑afbeelding te genereren in Java met Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Hoe een DataMatrix‑barcode te genereren met Aspose.BarCode voor .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..660226572 --- /dev/null +++ b/barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,258 @@ +--- +category: general +date: 2026-08-19 +description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: en +lastmod: 2026-08-19 +og_description: How to generate barcode with ECI using Aspose.Barcode for Python. + Follow this tutorial to learn how to add eci data, customize appearance, and save + the result. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: How to generate barcode with ECI using Aspose.Barcode Python – step‑by‑step +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: How to generate barcode with ECI using Aspose.Barcode Python +url: /python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# How to generate barcode with ECI using Aspose.Barcode Python + +If you need to know **how to generate barcode** that contains both plain characters and ECI‑encoded data, this guide shows the complete process. You’ll see exactly **how to add eci** sections, adjust size, and write the image to disk with a single, runnable script. + +The tutorial covers: + +* Retrieving the Aspose.Barcode library version (optional but useful for debugging). +* Building an extended codetext string that mixes plain and ECI‑encoded characters. +* Creating a barcode generator for a symbology that supports extended codetext. +* Customizing barcode dimensions and saving the final PNG file. + +No external documentation is required; copy the code, run it, and you’ll have a barcode image that includes Chinese characters encoded with ECI 26 (UTF‑8). + +## Prerequisites + +Before you start, make sure you have: + +* Python 3.8 or newer installed. +* `aspose-barcode` package installed (`pip install aspose-barcode`). +* Write permission to the folder where you intend to save the PNG file. + +If you’re using a virtual environment, activate it first to keep dependencies isolated. + +## Step 1: Verify the Aspose.Barcode version (optional) + +Knowing the exact library version helps when you need to report bugs or compare features across releases. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Why this matters*: The version output confirms that the runtime matches the documentation you’re following. Different versions may support different ECI values, so it’s a quick sanity check. + +## Step 2: Build an extended codetext with plain and ECI‑encoded parts + +Aspose.Barcode provides `ExtCodetextBuilder` to concatenate plain data and ECI‑encoded segments. In this example we mix a numeric string with Chinese characters. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explanation*: +* `add_plain_codetext` inserts data that the barcode symbology treats as ordinary characters. +* `add_eci_codetext` tells the generator to prepend an ECI indicator (here **26**, which maps to UTF‑8) before the supplied text. This is exactly **how to add eci** data to a barcode. + +You can call `add_eci_codetext` multiple times to embed several different language blocks. The builder handles the required escape sequences automatically. + +## Step 3: Choose a symbology that supports extended codetext + +Not every barcode type can store ECI segments. Code 128, QR, and Data Matrix are common choices. The example uses Code 128 because it is widely supported and works well for mixed alphanumeric data. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Why Code 128?*: It accepts the full ASCII range and the ECI escape sequences produced by the builder, making it ideal for the “how to generate barcode” scenario that mixes plain and encoded text. + +## Step 4: Adjust barcode appearance + +You can control size, height, margins, and many other visual aspects via the `parameters` object. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: If you plan to print the barcode, increase `x_dimension` and `bar_height` proportionally to maintain readability at the target DPI. + +## Step 5: Save the barcode image + +Finally, write the generated image to a file. Aspose.Barcode supports PNG, JPEG, BMP, and many other formats. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Make sure the `output` folder exists or create it with `os.makedirs("output", exist_ok=True)` before calling `save`. + +### Expected result + +When you open `extended_codetext.png`, you should see a Code 128 barcode that encodes the numeric string `1234567890` followed by the Chinese characters “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return the original mixed string. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode generated with how to generate barcode example"} + +## Common questions and edge cases + +### What if I need a different character set? + +Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` accordingly. + +### Can I embed more than one ECI block? + +Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary ECI switch codes between blocks, preserving the order you add them. + +### Does the generator support QR codes with ECI? + +Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### How to handle very long data strings? + +For linear barcodes like Code 128, the maximum length is about 80 characters when using extended codetext. If you exceed that, consider switching to a two‑dimensional symbology such as QR or Data Matrix, which can store thousands of characters. + +## Full, runnable script + +Below is the complete program you can copy‑paste into a file named `generate_extended_barcode.py` and run directly. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## What Should You Learn Next? + + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode Image in Java with Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [How to generate DataMatrix barcode with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/og-image.png b/barcode/english/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..9740deaa09bfdf716c8dc1bdb32c190cf1439477 GIT binary patch literal 54112 zcmbTd1yEee_b$qbVuJ^_2?>M{Ah=7I;O_3O6Wk@iJp^}mncxn=-CYKPySv{_&N;t& zx8D2J``=4VQM-2S-Mf2r_gd@w*4KeDQoI zy^Df?Fh(W%`ICav>@M8i2}k(p%ipzqqN~gM`+glr&m0|dRlbhK)KzQ4)lJeXYU=CN z5z(yKure?L`ZRykAB1O`itL}?+K74_w2e_U!js`7bMf#QRkbw<$Jasd`1g;W0sb`c zNM!%M@LM`pTlO^$0 zPcEKNA^7i+XyT{*vuOUair`3@;wcj=OT=$z?Z}YP4olpWeAuJH)AK>EA18&glJ3$6 zqw&+G6;98|CMbg*1l-)j$S_15Cb8wcX4=GlTuz)mo1iClUAN&WsMmj1k!CI=V1eB0 zG#kMk{}k!5Aw(mBKW0Jre@!LAf1hnmz84w%ZCekvv7HPBTGNnWncNi6U!Mz#O1NB( zv=Yg->=MFQ`{vt!_04pS_KVcI_S4hV+iGEs_ha?z1B1O1~o5y(S%;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!D>h(w<>lqkk&)`v;r8=Qpkg_?vbad5oF(`J1j=6bsLnPxK)Z>@ zx&{^zK|$qqlK~dBg+gcR?%g+@t}n2CuAYb7IjZ8uek zkILvUeRqnn!X=a1SuvFWe~=!Bk=gAYeh*FAcN~8VHSe6R)a^u9@|?721$Uq5W;FKn z99a+e-5u`e=%{k}o=*6vG`(#{gU@_w=y_S;l(d7&yGV%7x759V2FZXX@-~B~UM>Ra5 z)R`nYWzVtFp=3htazF(@f-NIj#jD>^;VGJq3kYcXC4FF_5wJ1vKtv}l**k_AoW3|e zrjWtEc4bFYSzhx9qe3NzFOsnM{lw;7NS)Yoc{Ad|GD10mU%vkjQZt*M literal 0 HcmV?d00001 diff --git a/barcode/french/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/french/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..7f7ae1056 --- /dev/null +++ b/barcode/french/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Comment générer un code‑barres avec ECI en utilisant Aspose.Barcode pour + Python. Découvrez comment ajouter des données ECI, mélanger du texte brut et enregistrer + l’image dans un guide clair. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: fr +lastmod: 2026-08-19 +og_description: Comment générer un code-barres avec ECI en utilisant Aspose.Barcode + pour Python. Suivez ce tutoriel pour apprendre comment ajouter des données ECI, + personnaliser l'apparence et enregistrer le résultat. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Comment générer un code‑barres avec ECI en utilisant Aspose.Barcode Python + – étape par étape +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Comment générer un code‑barres avec ECI à l’aide d’Aspose.Barcode Python +url: /fr/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Comment générer un code-barres avec ECI en utilisant Aspose.Barcode Python + +Si vous devez savoir **comment générer un code-barres** contenant à la fois des caractères simples et des données encodées en ECI, ce guide montre le processus complet. Vous verrez exactement **comment ajouter des sections eci**, ajuster la taille et écrire l'image sur le disque avec un seul script exécutable. + +Le tutoriel couvre : + +* Récupérer la version de la bibliothèque Aspose.Barcode (optionnel mais utile pour le débogage). +* Construire une chaîne de codetext étendue qui mélange des caractères simples et des caractères encodés en ECI. +* Créer un générateur de code-barres pour une symbologie qui prend en charge le codetext étendu. +* Personnaliser les dimensions du code-barres et enregistrer le fichier PNG final. + +Aucune documentation externe n'est requise ; copiez le code, exécutez-le, et vous obtiendrez une image de code-barres incluant des caractères chinois encodés avec ECI 26 (UTF‑8). + +## Prérequis + +Avant de commencer, assurez‑vous d'avoir : + +* Python 3.8 ou une version plus récente installé. +* Le package `aspose-barcode` installé (`pip install aspose-barcode`). +* Permission d'écriture sur le dossier où vous prévoyez d'enregistrer le fichier PNG. + +Si vous utilisez un environnement virtuel, activez‑le d'abord pour garder les dépendances isolées. + +## Étape 1 : Vérifier la version d'Aspose.Barcode (optionnel) + +Connaître la version exacte de la bibliothèque aide lorsque vous devez signaler des bugs ou comparer les fonctionnalités entre les versions. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Pourquoi c'est important* : La sortie de version confirme que le runtime correspond à la documentation que vous suivez. Des versions différentes peuvent prendre en charge des valeurs ECI différentes, c’est donc une vérification rapide. + +## Étape 2 : Construire un codetext étendu avec des parties simples et encodées en ECI + +Aspose.Barcode fournit `ExtCodetextBuilder` pour concaténer des données simples et des segments encodés en ECI. Dans cet exemple, nous mélangeons une chaîne numérique avec des caractères chinois. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explication* : +* `add_plain_codetext` insère des données que la symbologie du code‑barres traite comme des caractères ordinaires. +* `add_eci_codetext` indique au générateur de préfixer un indicateur ECI (ici **26**, qui correspond à UTF‑8) avant le texte fourni. C’est exactement **comment ajouter des données eci** à un code‑barres. + +Vous pouvez appeler `add_eci_codetext` plusieurs fois pour intégrer plusieurs blocs de langues différents. Le constructeur gère automatiquement les séquences d'échappement requises. + +## Étape 3 : Choisir une symbologie qui prend en charge le codetext étendu + +Tous les types de code‑barres ne peuvent pas stocker des segments ECI. Code 128, QR et Data Matrix sont des choix courants. L'exemple utilise Code 128 car il est largement supporté et fonctionne bien pour des données alphanumériques mixtes. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Pourquoi Code 128 ?* : Il accepte toute la gamme ASCII ainsi que les séquences d'échappement ECI générées par le constructeur, ce qui le rend idéal pour le scénario « comment générer un code‑barres » qui mélange texte simple et texte encodé. + +## Étape 4 : Ajuster l'apparence du code‑barres + +Vous pouvez contrôler la taille, la hauteur, les marges et de nombreux autres aspects visuels via l'objet `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Conseil* : Si vous prévoyez d'imprimer le code‑barres, augmentez `x_dimension` et `bar_height` proportionnellement pour maintenir la lisibilité à la résolution DPI cible. + +## Étape 5 : Enregistrer l'image du code‑barres + +Enfin, écrivez l'image générée dans un fichier. Aspose.Barcode prend en charge PNG, JPEG, BMP et de nombreux autres formats. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Assurez‑vous que le dossier `output` existe ou créez‑le avec `os.makedirs("output", exist_ok=True)` avant d'appeler `save`. + +### Résultat attendu + +Lorsque vous ouvrez `extended_codetext.png`, vous devez voir un code‑barres Code 128 qui encode la chaîne numérique `1234567890` suivie des caractères chinois « 特殊字符 ». Scanner le code‑barres avec un lecteur moderne qui respecte l'ECI renverra la chaîne mixte originale. + +![Code‑barres généré avec l'exemple de génération de code‑barres](https://example.com/images/barcode-sample.png){: .align-center alt="Code‑barres généré avec l'exemple de génération de code‑barres"} + +## Questions fréquentes et cas particuliers + +### Et si j'ai besoin d'un jeu de caractères différent ? + +Choisissez la valeur ECI appropriée dans le tableau ISO/IEC 18004. Par exemple, ECI 27 représente ISO‑8859‑1 (Latin‑1). Remplacez l'identifiant numérique dans `add_eci_codetext` en conséquence. + +### Puis‑je intégrer plus d'un bloc ECI ? + +Oui. Appelez `add_eci_codetext` plusieurs fois. Le constructeur insère les codes de commutation ECI nécessaires entre les blocs, en préservant l'ordre dans lequel vous les ajoutez. + +### Le générateur prend‑il en charge les QR codes avec ECI ? + +Absolument. Remplacez `barcode.Symbology.CODE_128` par `barcode.Symbology.QR` et ajustez les paramètres spécifiques aux QR (par ex., le niveau de correction d'erreurs) via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Comment gérer des chaînes de données très longues ? + +Pour les codes‑barres linéaires comme Code 128, la longueur maximale est d'environ 80 caractères lorsqu'on utilise le codetext étendu. Si vous dépassez cette limite, envisagez de passer à une symbologie bidimensionnelle telle que QR ou Data Matrix, qui peut stocker des milliers de caractères. + +## Script complet et exécutable + +Ci‑dessous se trouve le programme complet que vous pouvez copier‑coller dans un fichier nommé `generate_extended_barcode.py` et exécuter directement. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Que devriez‑vous apprendre ensuite ? + +Les tutoriels suivants couvrent des sujets étroitement liés qui s'appuient sur les techniques démontrées dans ce guide. Chaque ressource inclut des exemples de code complets et fonctionnels avec des explications étape par étape pour vous aider à maîtriser des fonctionnalités supplémentaires de l'API et explorer des approches d'implémentation alternatives dans vos propres projets. + +- [Comment générer une image de code‑barres avec personnalisation de l'espace supplémentaire en utilisant Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Comment générer une image de code‑barres en Java avec Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Comment générer un code‑barres DataMatrix avec Aspose.BarCode pour .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/german/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/german/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..281df0b0e --- /dev/null +++ b/barcode/german/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,260 @@ +--- +category: general +date: 2026-08-19 +description: Wie man mit Aspose.Barcode für Python einen Barcode mit ECI erzeugt. + Erfahren Sie, wie Sie ECI‑Daten hinzufügen, Klartext mischen und das Bild in einer + klaren Anleitung speichern. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: de +lastmod: 2026-08-19 +og_description: Wie man mit Aspose.Barcode für Python einen Barcode mit ECI erstellt. + Folgen Sie diesem Tutorial, um zu lernen, wie man ECI‑Daten hinzufügt, das Aussehen + anpasst und das Ergebnis speichert. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Wie man mit Aspose.Barcode Python einen Barcode mit ECI erzeugt – Schritt + für Schritt +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Wie man mit Aspose.Barcode Python einen Barcode mit ECI erzeugt +url: /de/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Wie man einen Barcode mit ECI unter Verwendung von Aspose.Barcode Python erzeugt + +Wenn Sie wissen möchten, **wie man einen Barcode** erzeugt, der sowohl einfache Zeichen als auch ECI‑kodierte Daten enthält, zeigt Ihnen diese Anleitung den kompletten Prozess. Sie sehen genau, **wie man eci**‑Abschnitte hinzufügt, die Größe anpasst und das Bild mit einem einzigen, ausführbaren Skript auf die Festplatte schreibt. + +Die Anleitung behandelt: + +* Abrufen der Aspose.Barcode‑Bibliotheksversion (optional, aber nützlich für die Fehlersuche). +* Erstellen einer erweiterten Codetext‑Zeichenkette, die einfache und ECI‑kodierte Zeichen mischt. +* Erzeugen eines Barcode‑Generators für eine Symbolik, die erweiterten Codetext unterstützt. +* Anpassen der Barcode‑Abmessungen und Speichern der finalen PNG‑Datei. + +Keine externe Dokumentation ist erforderlich; kopieren Sie den Code, führen Sie ihn aus, und Sie erhalten ein Barcode‑Bild, das chinesische Zeichen enthält, die mit ECI 26 (UTF‑8) kodiert sind. + +## Voraussetzungen + +Stellen Sie vor dem Start sicher, dass Sie Folgendes haben: + +* Python 3.8 oder neuer installiert. +* Das Paket `aspose-barcode` installiert (`pip install aspose-barcode`). +* Schreibrechte für den Ordner, in dem Sie die PNG‑Datei speichern möchten. + +Wenn Sie eine virtuelle Umgebung verwenden, aktivieren Sie diese zuerst, um Abhängigkeiten isoliert zu halten. + +## Schritt 1: Überprüfen der Aspose.Barcode‑Version (optional) + +Das genaue Wissen um die Bibliotheksversion hilft, wenn Sie Fehler melden oder Funktionen zwischen Releases vergleichen müssen. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Warum das wichtig ist*: Die Versionsausgabe bestätigt, dass die Laufzeit mit der Dokumentation übereinstimmt, der Sie folgen. Unterschiedliche Versionen können unterschiedliche ECI‑Werte unterstützen, daher ist dies ein schneller Plausibilitäts‑Check. + +## Schritt 2: Erstellen eines erweiterten Codetexts mit einfachen und ECI‑kodierten Teilen + +Aspose.Barcode stellt `ExtCodetextBuilder` bereit, um einfache Daten und ECI‑kodierte Segmente zu verketten. In diesem Beispiel mischen wir eine numerische Zeichenkette mit chinesischen Zeichen. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Erklärung*: +* `add_plain_codetext` fügt Daten ein, die die Barcode‑Symbolik als gewöhnliche Zeichen behandelt. +* `add_eci_codetext` weist den Generator an, einen ECI‑Indikator (hier **26**, der UTF‑8 entspricht) vor den angegebenen Text zu setzen. Das ist genau **wie man eci**‑Daten zu einem Barcode hinzufügt. + +Sie können `add_eci_codetext` mehrfach aufrufen, um mehrere unterschiedliche Sprachblöcke einzubetten. Der Builder übernimmt automatisch die erforderlichen Escape‑Sequenzen. + +## Schritt 3: Auswahl einer Symbolik, die erweiterten Codetext unterstützt + +Nicht jeder Barcode‑Typ kann ECI‑Segmente speichern. Code 128, QR und Data Matrix sind gängige Optionen. Das Beispiel verwendet Code 128, weil es weit verbreitet ist und gut für gemischte alphanumerische Daten funktioniert. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Warum Code 128?*: Es akzeptiert den gesamten ASCII‑Bereich und die vom Builder erzeugten ECI‑Escape‑Sequenzen, was es ideal für das Szenario „wie man einen Barcode erzeugt“ macht, bei dem einfacher und kodierter Text gemischt werden. + +## Schritt 4: Anpassen des Barcode‑Aussehens + +Sie können Größe, Höhe, Ränder und viele weitere visuelle Aspekte über das Objekt `parameters` steuern. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tipp*: Wenn Sie planen, den Barcode zu drucken, erhöhen Sie `x_dimension` und `bar_height` proportional, um die Lesbarkeit bei der gewünschten DPI zu erhalten. + +## Schritt 5: Speichern des Barcode‑Bildes + +Zum Schluss schreiben Sie das erzeugte Bild in eine Datei. Aspose.Barcode unterstützt PNG, JPEG, BMP und viele weitere Formate. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Stellen Sie sicher, dass der Ordner `output` existiert oder erstellen Sie ihn mit `os.makedirs("output", exist_ok=True)`, bevor Sie `save` aufrufen. + +### Erwartetes Ergebnis + +Wenn Sie `extended_codetext.png` öffnen, sollten Sie einen Code 128‑Barcode sehen, der die numerische Zeichenkette `1234567890` gefolgt von den chinesischen Zeichen „特殊字符“ kodiert. Das Scannen des Barcodes mit einem modernen Scanner, der ECI respektiert, liefert die ursprüngliche gemischte Zeichenkette zurück. + +![Barcode erzeugt mit dem Beispiel zur Barcode-Generierung](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode erzeugt mit dem Beispiel zur Barcode-Generierung"} + +## Häufige Fragen und Sonderfälle + +### Was tun, wenn ich einen anderen Zeichensatz benötige? + +Wählen Sie den passenden ECI‑Wert aus der ISO/IEC 18004‑Tabelle. Beispielsweise steht ECI 27 für ISO‑8859‑1 (Latin‑1). Ersetzen Sie die numerische Kennung in `add_eci_codetext` entsprechend. + +### Kann ich mehr als einen ECI‑Block einbetten? + +Ja. Rufen Sie `add_eci_codetext` mehrfach auf. Der Builder fügt die notwendigen ECI‑Umschaltcodes zwischen den Blöcken ein und bewahrt die Reihenfolge, in der Sie sie hinzufügen. + +### Unterstützt der Generator QR‑Codes mit ECI? + +Absolut. Ersetzen Sie `barcode.Symbology.CODE_128` durch `barcode.Symbology.QR` und passen Sie ggf. QR‑spezifische Parameter (z. B. Fehlerschutzniveau) über `generator.parameters.qr` an. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Wie gehe ich mit sehr langen Datenzeichenketten um? + +Für lineare Barcodes wie Code 128 liegt die maximale Länge bei etwa 80 Zeichen, wenn erweiterter Codetext verwendet wird. Überschreiten Sie diesen Wert, sollten Sie zu einer zweidimensionalen Symbolik wie QR oder Data Matrix wechseln, die Tausende von Zeichen speichern kann. + +## Vollständiges, ausführbares Skript + +Unten finden Sie das komplette Programm, das Sie in eine Datei namens `generate_extended_barcode.py` kopieren und direkt ausführen können. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Was sollten Sie als Nächstes lernen? + + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in dieser Anleitung gezeigten Techniken aufbauen. Jede Ressource enthält vollständige, funktionierende Code‑Beispiele mit Schritt‑für‑Schritt‑Erklärungen, um Ihnen zu helfen, weitere API‑Funktionen zu meistern und alternative Implementierungsansätze in Ihren eigenen Projekten zu erkunden. + +- [Wie man ein Barcode‑Bild mit zusätzlicher Raum‑Anpassung unter Verwendung von Aspose.BarCode erzeugt](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Wie man ein Barcode‑Bild in Java mit Aspose.BarCode erzeugt](/barcode/english/java/barcode-rendering-techniques/) +- [Wie man einen DataMatrix‑Barcode mit Aspose.BarCode für .NET erzeugt](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/greek/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/greek/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..9cce543dd --- /dev/null +++ b/barcode/greek/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,260 @@ +--- +category: general +date: 2026-08-19 +description: Πώς να δημιουργήσετε γραμμωτό κώδικα με ECI χρησιμοποιώντας το Aspose.Barcode + για Python. Μάθετε πώς να προσθέσετε δεδομένα ECI, να συνδυάσετε απλό κείμενο και + να αποθηκεύσετε την εικόνα σε έναν σαφή οδηγό. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: el +lastmod: 2026-08-19 +og_description: Πώς να δημιουργήσετε γραμμωτό κώδικα με ECI χρησιμοποιώντας το Aspose.Barcode + για Python. Ακολουθήστε αυτό το σεμινάριο για να μάθετε πώς να προσθέσετε δεδομένα + ECI, να προσαρμόσετε την εμφάνιση και να αποθηκεύσετε το αποτέλεσμα. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Πώς να δημιουργήσετε γραμμωτό κώδικα με ECI χρησιμοποιώντας το Aspose.Barcode + Python – βήμα‑βήμα +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Πώς να δημιουργήσετε γραμμωτό κώδικα με ECI χρησιμοποιώντας το Aspose.Barcode + Python +url: /el/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Πώς να δημιουργήσετε barcode με ECI χρησιμοποιώντας Aspose.Barcode Python + +Αν χρειάζεστε να μάθετε **πώς να δημιουργήσετε barcode** που περιέχει τόσο απλούς χαρακτήρες όσο και δεδομένα κωδικοποιημένα με ECI, αυτός ο οδηγός παρουσιάζει τη διαδικασία από την αρχή μέχρι το τέλος. Θα δείτε ακριβώς **πώς να προσθέσετε eci** τμήματα, να προσαρμόσετε το μέγεθος και να αποθηκεύσετε την εικόνα στο δίσκο με ένα μόνο, εκτελέσιμο script. + +Το tutorial καλύπτει: + +* Ανάκτηση της έκδοσης της βιβλιοθήκης Aspose.Barcode (προαιρετικό αλλά χρήσιμο για εντοπισμό σφαλμάτων). +* Δημιουργία μιας συμβολοσειράς extended codetext που αναμειγνύει απλούς και ECI‑κωδικοποιημένους χαρακτήρες. +* Δημιουργία ενός barcode generator για μια συμβολική γλώσσα που υποστηρίζει extended codetext. +* Προσαρμογή των διαστάσεων του barcode και αποθήκευση του τελικού αρχείου PNG. + +Δεν απαιτείται εξωτερική τεκμηρίωση· αντιγράψτε τον κώδικα, εκτελέστε τον και θα έχετε μια εικόνα barcode που περιλαμβάνει κινέζους χαρακτήρες κωδικοποιημένους με ECI 26 (UTF‑8). + +## Προαπαιτούμενα + +Πριν ξεκινήσετε, βεβαιωθείτε ότι έχετε: + +* Python 3.8 ή νεότερη εγκατεστημένη. +* Το πακέτο `aspose-barcode` εγκατεστημένο (`pip install aspose-barcode`). +* Δικαιώματα εγγραφής στο φάκελο όπου σκοπεύετε να αποθηκεύσετε το αρχείο PNG. + +Αν χρησιμοποιείτε εικονικό περιβάλλον, ενεργοποιήστε το πρώτα για να διατηρήσετε τις εξαρτήσεις απομονωμένες. + +## Βήμα 1: Επαλήθευση της έκδοσης Aspose.Barcode (προαιρετικό) + +Η γνώση της ακριβούς έκδοσης της βιβλιοθήκης βοηθά όταν χρειάζεται να αναφέρετε σφάλματα ή να συγκρίνετε δυνατότητες μεταξύ εκδόσεων. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Γιατί είναι σημαντικό*: Η έξοδος της έκδοσης επιβεβαιώνει ότι το runtime ταιριάζει με την τεκμηρίωση που ακολουθείτε. Διαφορετικές εκδόσεις μπορεί να υποστηρίζουν διαφορετικές τιμές ECI, οπότε αποτελεί έναν γρήγορο έλεγχο λογικής. + +## Βήμα 2: Δημιουργία extended codetext με απλά και ECI‑κωδικοποιημένα τμήματα + +Η Aspose.Barcode παρέχει το `ExtCodetextBuilder` για τη σύνδεση απλών δεδομένων και τμημάτων κωδικοποιημένων με ECI. Σε αυτό το παράδειγμα αναμειγνύουμε μια αριθμητική συμβολοσειρά με κινέζους χαρακτήρες. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Εξήγηση*: +* `add_plain_codetext` εισάγει δεδομένα που η συμβολική γλώσσα του barcode αντιμετωπίζει ως συνηθισμένους χαρακτήρες. +* `add_eci_codetext` λέει στον δημιουργό να προσθέσει έναν δείκτη ECI (εδώ **26**, που αντιστοιχεί σε UTF‑8) πριν από το κείμενο που παρέχεται. Αυτό είναι ακριβώς **πώς να προσθέσετε eci** δεδομένα σε ένα barcode. + +Μπορείτε να καλέσετε το `add_eci_codetext` πολλές φορές για να ενσωματώσετε διάφορα μπλοκ γλωσσών. Ο builder διαχειρίζεται αυτόματα τις απαιτούμενες ακολουθίες διαφυγής. + +## Βήμα 3: Επιλογή συμβολικής γλώσσας που υποστηρίζει extended codetext + +Δεν κάθε τύπος barcode μπορεί να αποθηκεύσει τμήματα ECI. Code 128, QR και Data Matrix είναι κοινές επιλογές. Το παράδειγμα χρησιμοποιεί Code 128 επειδή υποστηρίζεται ευρέως και λειτουργεί καλά για μεικτά αλφαριθμητικά δεδομένα. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Γιατί Code 128;*: Δέχεται όλο το εύρος ASCII και τις ακολουθίες διαφυγής ECI που παράγει ο builder, καθιστώντας το ιδανικό για το σενάριο «πώς να δημιουργήσετε barcode» που αναμειγνύει απλό και κωδικοποιημένο κείμενο. + +## Βήμα 4: Προσαρμογή εμφάνισης του barcode + +Μπορείτε να ελέγξετε το μέγεθος, το ύψος, τα περιθώρια και πολλές άλλες οπτικές πτυχές μέσω του αντικειμένου `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Συμβουλή*: Αν σκοπεύετε να εκτυπώσετε το barcode, αυξήστε το `x_dimension` και το `bar_height` αναλογικά για να διατηρήσετε την αναγνωσιμότητα στο επιθυμητό DPI. + +## Βήμα 5: Αποθήκευση της εικόνας barcode + +Τέλος, γράψτε την παραγόμενη εικόνα σε αρχείο. Η Aspose.Barcode υποστηρίζει PNG, JPEG, BMP και πολλές άλλες μορφές. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Βεβαιωθείτε ότι ο φάκελος `output` υπάρχει ή δημιουργήστε τον με `os.makedirs("output", exist_ok=True)` πριν καλέσετε το `save`. + +### Αναμενόμενο αποτέλεσμα + +Όταν ανοίξετε το `extended_codetext.png`, θα πρέπει να δείτε ένα barcode Code 128 που κωδικοποιεί τη αριθμητική συμβολοσειρά `1234567890` ακολουθούμενη από τους κινέζους χαρακτήρες “特殊字符”. Η σάρωση του barcode με έναν σύγχρονο σαρωτή που σέβεται το ECI θα επιστρέψει την αρχική μεικτή συμβολοσειρά. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode που δημιουργήθηκε με το παράδειγμα πώς να δημιουργήσετε barcode"} + +## Συχνές ερωτήσεις και ειδικές περιπτώσεις + +### Τι κάνω αν χρειάζομαι διαφορετικό σύνολο χαρακτήρων; + +Επιλέξτε την κατάλληλη τιμή ECI από τον πίνακα ISO/IEC 18004. Για παράδειγμα, το ECI 27 αντιπροσωπεύει ISO‑8859‑1 (Latin‑1). Αντικαταστήστε τον αριθμητικό αναγνωριστικό στο `add_eci_codetext` ανάλογα. + +### Μπορώ να ενσωματώσω περισσότερα από ένα μπλοκ ECI; + +Ναι. Καλέστε το `add_eci_codetext` πολλές φορές. Ο builder εισάγει τους απαραίτητους κωδικούς εναλλαγής ECI μεταξύ των μπλοκ, διατηρώντας τη σειρά που τα προσθέτετε. + +### Υποστηρίζει ο δημιουργός QR codes με ECI; + +Απολύτως. Αντικαταστήστε το `barcode.Symbology.CODE_128` με `barcode.Symbology.QR` και προσαρμόστε τυχόν QR‑συγκεκριμένες παραμέτρους (π.χ., επίπεδο διόρθωσης σφαλμάτων) μέσω του `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Πώς να διαχειριστώ πολύ μεγάλες συμβολοσειρές δεδομένων; + +Για γραμμικά barcodes όπως το Code 128, το μέγιστο μήκος είναι περίπου 80 χαρακτήρες όταν χρησιμοποιείται extended codetext. Αν το υπερβείτε, σκεφτείτε να μεταβείτε σε μια δισδιάστατη συμβολική γλώσσα όπως QR ή Data Matrix, η οποία μπορεί να αποθηκεύσει χιλιάδες χαρακτήρες. + +## Πλήρες, εκτελέσιμο script + +Παρακάτω βρίσκεται το πλήρες πρόγραμμα που μπορείτε να αντιγράψετε‑επικολλήσετε σε ένα αρχείο με όνομα `generate_extended_barcode.py` και να το εκτελέσετε άμεσα. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Τι Θα Μάθετε Στη Σύντομη Επόμενη + +Τα παρακάτω tutorials καλύπτουν στενά συναφή θέματα που βασίζονται στις τεχνικές που παρουσιάζονται σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικά παραδείγματα κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσουν να κυριαρχήσετε πρόσθετες δυνατότητες του API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε εικόνα Barcode με προσαρμογή συμπληρωματικού χώρου χρησιμοποιώντας Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Πώς να δημιουργήσετε εικόνα Barcode σε Java με Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Πώς να δημιουργήσετε barcode DataMatrix με Aspose.BarCode για .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hindi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/hindi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..512510863 --- /dev/null +++ b/barcode/hindi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,258 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.Barcode for Python का उपयोग करके ECI के साथ बारकोड कैसे जनरेट + करें। जानें कि ECI डेटा कैसे जोड़ें, साधारण टेक्स्ट को मिलाएँ, और एक स्पष्ट गाइड + में इमेज को कैसे सहेजें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: hi +lastmod: 2026-08-19 +og_description: Aspose.Barcode for Python का उपयोग करके ECI के साथ बारकोड कैसे जनरेट + करें। इस ट्यूटोरियल का पालन करें ताकि आप जान सकें कि ECI डेटा कैसे जोड़ें, रूप को + कैसे अनुकूलित करें, और परिणाम को कैसे सहेजें। +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Aspose.Barcode Python का उपयोग करके ECI के साथ बारकोड कैसे बनाएं – चरण-दर-चरण +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Aspose.Barcode Python का उपयोग करके ECI के साथ बारकोड कैसे जनरेट करें +url: /hi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Aspose.Barcode Python का उपयोग करके ECI के साथ बारकोड कैसे जनरेट करें + +यदि आपको पता करना है **how to generate barcode** जो साधारण अक्षरों और ECI‑एन्कोडेड डेटा दोनों को शामिल करता है, तो यह गाइड पूरी प्रक्रिया दिखाता है। आप बिल्कुल देखेंगे **how to add eci** सेक्शन, आकार समायोजित करना, और एक ही, चलाने योग्य स्क्रिप्ट के साथ इमेज को डिस्क पर लिखना। + +यह ट्यूटोरियल शामिल करता है: + +* Aspose.Barcode लाइब्रेरी संस्करण प्राप्त करना (वैकल्पिक लेकिन डिबगिंग के लिए उपयोगी)। +* एक विस्तारित कोडटेक्स्ट स्ट्रिंग बनाना जो साधारण और ECI‑एन्कोडेड अक्षरों को मिलाता है। +* एक बारकोड जेनरेटर बनाना जो विस्तारित कोडटेक्स्ट को सपोर्ट करने वाले सिम्बोलॉजी के लिए हो। +* बारकोड आयामों को कस्टमाइज़ करना और अंतिम PNG फ़ाइल को सहेजना। + +कोई बाहरी दस्तावेज़ीकरण आवश्यक नहीं है; कोड को कॉपी करें, चलाएँ, और आपके पास एक बारकोड इमेज होगी जिसमें ECI 26 (UTF‑8) के साथ एन्कोडेड चीनी अक्षर शामिल होंगे। + +## Prerequisites + +शुरू करने से पहले सुनिश्चित करें कि आपके पास है: + +* Python 3.8 या उससे नया स्थापित हो। +* `aspose-barcode` पैकेज स्थापित हो (`pip install aspose-barcode`)। +* वह फ़ोल्डर जहाँ आप PNG फ़ाइल सहेजने वाले हैं, उसमें लिखने की अनुमति हो। + +यदि आप वर्चुअल एनवायरनमेंट का उपयोग कर रहे हैं, तो निर्भरताओं को अलग रखने के लिए पहले उसे सक्रिय करें। + +## Step 1: Verify the Aspose.Barcode version (optional) + +सटीक लाइब्रेरी संस्करण जानना मददगार होता है जब आपको बग रिपोर्ट करना हो या विभिन्न रिलीज़ के बीच फीचर तुलना करनी हो। + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Why this matters*: संस्करण आउटपुट यह पुष्टि करता है कि रनटाइम उस दस्तावेज़ीकरण से मेल खाता है जिसे आप फॉलो कर रहे हैं। विभिन्न संस्करण विभिन्न ECI मानों को सपोर्ट कर सकते हैं, इसलिए यह एक त्वरित सत्यापन है। + +## Step 2: Build an extended codetext with plain and ECI‑encoded parts + +Aspose.Barcode `ExtCodetextBuilder` प्रदान करता है जिससे आप साधारण डेटा और ECI‑एन्कोडेड सेगमेंट को जोड़ सकते हैं। इस उदाहरण में हम एक संख्यात्मक स्ट्रिंग को चीनी अक्षरों के साथ मिलाते हैं। + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explanation*: +* `add_plain_codetext` वह डेटा डालता है जिसे बारकोड सिम्बोलॉजी सामान्य अक्षरों के रूप में मानती है। +* `add_eci_codetext` जेनरेटर को एक ECI इंडिकेटर (यहाँ **26**, जो UTF‑8 से मैप होता है) प्रदान किए गए टेक्स्ट से पहले जोड़ने के लिए कहता है। यह बिल्कुल **how to add eci** डेटा को बारकोड में जोड़ने का तरीका है। + +आप `add_eci_codetext` को कई बार कॉल करके कई अलग‑अलग भाषा ब्लॉक्स एम्बेड कर सकते हैं। बिल्डर आवश्यक एस्केप सीक्वेंसेज़ को स्वचालित रूप से संभालता है। + +## Step 3: Choose a symbology that supports extended codetext + +हर बारकोड प्रकार ECI सेगमेंट संग्रहीत नहीं कर सकता। Code 128, QR, और Data Matrix सामान्य विकल्प हैं। इस उदाहरण में Code 128 का उपयोग किया गया है क्योंकि यह व्यापक रूप से समर्थित है और मिश्रित अल्फ़ान्यूमेरिक डेटा के लिए अच्छा काम करता है। + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Why Code 128?*: यह पूरी ASCII रेंज और बिल्डर द्वारा उत्पन्न ECI एस्केप सीक्वेंसेज़ को स्वीकार करता है, जिससे यह “how to generate barcode” परिदृश्य के लिए आदर्श बनता है जहाँ साधारण और एन्कोडेड टेक्स्ट दोनों मिश्रित होते हैं। + +## Step 4: Adjust barcode appearance + +आप `parameters` ऑब्जेक्ट के माध्यम से आकार, ऊँचाई, मार्जिन और कई अन्य दृश्य पहलुओं को नियंत्रित कर सकते हैं। + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: यदि आप बारकोड को प्रिंट करने की योजना बना रहे हैं, तो `x_dimension` और `bar_height` को लक्ष्य DPI पर पठनीयता बनाए रखने के लिए अनुपातिक रूप से बढ़ाएँ। + +## Step 5: Save the barcode image + +अंत में, जेनरेट की गई इमेज को फ़ाइल में लिखें। Aspose.Barcode PNG, JPEG, BMP और कई अन्य फ़ॉर्मेट को सपोर्ट करता है। + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +`save` कॉल करने से पहले सुनिश्चित करें कि `output` फ़ोल्डर मौजूद है या `os.makedirs("output", exist_ok=True)` से उसे बनाएँ। + +### Expected result + +जब आप `extended_codetext.png` खोलेंगे, तो आपको एक Code 128 बारकोड दिखेगा जो संख्यात्मक स्ट्रिंग `1234567890` के बाद चीनी अक्षर “特殊字符” को एन्कोड करता है। आधुनिक स्कैनर जो ECI को सपोर्ट करता है, वह मूल मिश्रित स्ट्रिंग वापस देगा। + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="बारकोड जनरेट करने के उदाहरण के साथ उत्पन्न बारकोड"} + +## Common questions and edge cases + +### What if I need a different character set? + +ISO/IEC 18004 तालिका से उपयुक्त ECI मान चुनें। उदाहरण के लिए, ECI 27 ISO‑8859‑1 (Latin‑1) को दर्शाता है। `add_eci_codetext` में संख्यात्मक पहचानकर्ता को उसी अनुसार बदलें। + +### Can I embed more than one ECI block? + +हाँ। `add_eci_codetext` को कई बार कॉल करें। बिल्डर ब्लॉक्स के बीच आवश्यक ECI स्विच कोड डालता है, जिससे आप जो क्रम जोड़ते हैं वह बना रहता है। + +### Does the generator support QR codes with ECI? + +बिल्कुल। `barcode.Symbology.CODE_128` को `barcode.Symbology.QR` से बदलें और `generator.parameters.qr` के माध्यम से QR‑विशिष्ट पैरामीटर (जैसे एरर करेक्शन लेवल) को समायोजित करें। + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### How to handle very long data strings? + +लिनियर बारकोड जैसे Code 128 के लिए, विस्तारित कोडटेक्स्ट का उपयोग करते समय अधिकतम लंबाई लगभग 80 अक्षर होती है। यदि आप इससे अधिक होते हैं, तो QR या Data Matrix जैसे दो‑आयामी सिम्बोलॉजी पर स्विच करने पर विचार करें, जो हजारों अक्षर संग्रहीत कर सकते हैं। + +## Full, runnable script + +नीचे पूरा प्रोग्राम दिया गया है जिसे आप `generate_extended_barcode.py` नाम की फ़ाइल में कॉपी‑पेस्ट करके सीधे चला सकते हैं। + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## What Should You Learn Next? + +नीचे दिए गए ट्यूटोरियल्स उन विषयों को कवर करते हैं जो इस गाइड में प्रदर्शित तकनीकों पर आधारित हैं। प्रत्येक संसाधन में पूर्ण कार्यशील कोड उदाहरण और चरण‑दर‑चरण व्याख्याएँ शामिल हैं, जिससे आप अतिरिक्त API सुविधाओं में महारत हासिल कर सकें और अपने प्रोजेक्ट में वैकल्पिक कार्यान्वयन दृष्टिकोणों का अन्वेषण कर सकें। + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode Image in Java with Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [How to generate DataMatrix barcode with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hongkong/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/hongkong/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..d6bf77e99 --- /dev/null +++ b/barcode/hongkong/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,254 @@ +--- +category: general +date: 2026-08-19 +description: 如何使用 Aspose.Barcode for Python 產生帶有 ECI 的條碼。學習如何加入 ECI 資料、混合純文字,並將圖像儲存,一目了然的完整指南。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: zh-hant +lastmod: 2026-08-19 +og_description: 如何使用 Aspose.Barcode for Python 產生帶有 ECI 的條碼。請跟隨本教學了解如何加入 ECI 資料、客製化外觀,並儲存結果。 +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: 使用 Aspose.Barcode Python 生成帶 ECI 的條碼 – 逐步說明 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: 使用 Aspose.Barcode Python 生成帶 ECI 的條碼 +url: /zh-hant/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 如何使用 Aspose.Barcode Python 產生含 ECI 的條碼 + +如果您想了解 **如何產生條碼**,且條碼同時包含普通字元與 ECI 編碼資料,本指南將完整說明整個流程。您將會看到 **如何加入 eci** 區段、調整尺寸,並以單一可執行腳本將影像寫入磁碟的步驟。 + +本教學涵蓋: + +* 取得 Aspose.Barcode 函式庫版本(可選,但對除錯很有幫助)。 +* 建立混合普通與 ECI 編碼字元的擴充碼文字字串。 +* 為支援擴充碼文字的條碼符號建立條碼產生器。 +* 自訂條碼尺寸並儲存最終的 PNG 檔案。 + +不需要額外文件;只要複製程式碼、執行,即可得到包含以 ECI 26(UTF‑8)編碼之中文字符的條碼影像。 + +## 前置條件 + +在開始之前,請確保您已具備: + +* 已安裝 Python 3.8 或更新版本。 +* `aspose-barcode` 套件已安裝(`pip install aspose-barcode`)。 +* 對欲儲存 PNG 檔案之資料夾具寫入權限。 + +如果您使用虛擬環境,請先啟動它,以保持相依套件的隔離。 + +## 步驟 1:驗證 Aspose.Barcode 版本(可選) + +了解確切的函式庫版本有助於回報錯誤或在不同版本間比較功能。 + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*為什麼這很重要*:版本輸出可確認執行環境與您參考的文件相符。不同版本可能支援不同的 ECI 值,因此這是一個快速的 sanity check(檢查)。 + +## 步驟 2:使用普通與 ECI 編碼部分建立擴充碼文字 + +Aspose.Barcode 提供 `ExtCodetextBuilder` 以串接普通資料與 ECI 編碼段落。在本例中,我們將數字字串與中文字符混合。 + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*說明*: +* `add_plain_codetext` 插入條碼符號視為普通字元的資料。 +* `add_eci_codetext` 告訴產生器在提供的文字前加上 ECI 指示符(此處為 **26**,對應 UTF‑8)。這正是 **如何加入 eci** 資料到條碼的方式。 + +您可以多次呼叫 `add_eci_codetext` 以嵌入多個不同語言的區塊。建構器會自動處理所需的跳脫序列。 + +## 步驟 3:選擇支援擴充碼文字的條碼符號 + +並非所有條碼類型都能儲存 ECI 區段。Code 128、QR 與 Data Matrix 是常見的選擇。範例使用 Code 128,因其支援度高且適合混合字母數字資料。 + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*為什麼選擇 Code 128*:它接受完整的 ASCII 範圍以及建構器產生的 ECI 跳脫序列,因而非常適合本「如何產生條碼」的情境,混合普通與編碼文字。 + +## 步驟 4:調整條碼外觀 + +您可以透過 `parameters` 物件控制尺寸、高度、邊距以及其他多項視覺屬性。 + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*提示*:若您打算列印條碼,請按比例提升 `x_dimension` 與 `bar_height`,以確保在目標 DPI 下的可讀性。 + +## 步驟 5:儲存條碼影像 + +最後,將產生的影像寫入檔案。Aspose.Barcode 支援 PNG、JPEG、BMP 以及其他多種格式。 + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +在呼叫 `save` 前,請確保 `output` 資料夾已存在,或使用 `os.makedirs("output", exist_ok=True)` 建立它。 + +### 預期結果 + +當您開啟 `extended_codetext.png` 時,應會看到一個 Code 128 條碼,編碼了數字字串 `1234567890`,其後接著中文字符「特殊字符」。使用支援 ECI 的現代掃描器掃描此條碼,將會回傳原始的混合字串。 + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="使用「如何產生條碼」範例產生的條碼"} + +## 常見問題與邊緣情況 + +### 如果需要不同的字元集該怎麼辦? + +從 ISO/IEC 18004 表格中選擇相應的 ECI 值。例如,ECI 27 代表 ISO‑8859‑1(Latin‑1)。請相應地在 `add_eci_codetext` 中替換數字識別碼。 + +### 可以嵌入多個 ECI 區塊嗎? + +可以。多次呼叫 `add_eci_codetext` 即可。建構器會在區塊之間插入必要的 ECI 切換碼,並保留您加入的順序。 + +### 產生器支援帶有 ECI 的 QR 代碼嗎? + +當然可以。將 `barcode.Symbology.CODE_128` 替換為 `barcode.Symbology.QR`,並透過 `generator.parameters.qr` 調整任何 QR 專屬參數(例如錯誤更正等級)。 + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### 如何處理非常長的資料字串? + +對於像 Code 128 這樣的線性條碼,使用擴充碼文字時最大長度約為 80 個字元。若超過此長度,建議改用二維條碼(如 QR 或 Data Matrix),其可儲存數千個字元。 + +## 完整、可執行的腳本 + +以下是完整程式碼,您可直接複製貼上至名為 `generate_extended_barcode.py` 的檔案並執行。 + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## 接下來您應該學習什麼? + +以下教學涵蓋與本指南緊密相關的主題,並在此基礎上延伸技術。每個資源皆提供完整可執行的程式碼範例與逐步說明,協助您精通更多 API 功能,並在自己的專案中探索替代實作方式。 + +- [如何使用 Aspose.BarCode 產生帶有補充空間自訂的條碼影像](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [如何在 Java 中使用 Aspose.BarCode 產生條碼影像](/barcode/english/java/barcode-rendering-techniques/) +- [如何在 .NET 中使用 Aspose.BarCode 產生 DataMatrix 條碼](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/hungarian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/hungarian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..ee50812f2 --- /dev/null +++ b/barcode/hungarian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Hogyan generáljunk vonalkódot ECI-vel az Aspose.Barcode for Python használatával. + Tanulja meg, hogyan adjon hozzá ECI adatot, keverje a sima szöveget, és mentse el + a képet egy átfogó útmutatóban. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: hu +lastmod: 2026-08-19 +og_description: Hogyan generáljunk vonalkódot ECI-vel az Aspose.Barcode for Python + segítségével. Kövesse ezt az útmutatót, hogy megtudja, hogyan adjon hozzá ECI adatot, + testreszabja a megjelenést, és mentse az eredményt. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Hogyan generáljunk vonalkódot ECI-vel az Aspose.Barcode Python használatával + – lépésről lépésre +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Hogyan generáljunk vonalkódot ECI-vel az Aspose.Barcode Python használatával +url: /hu/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Hogyan generáljunk vonalkódot ECI-vel az Aspose.Barcode Python használatával + +Ha szeretnéd megtudni, **hogyan generálj vonalkódot**, amely egyszerű karaktereket és ECI‑kódolt adatokat egyaránt tartalmaz, ez az útmutató bemutatja a teljes folyamatot. Pontosan látni fogod, **hogyan adjunk hozzá eci** szekciókat, állítsuk be a méretet, és írjuk a képet lemezre egyetlen, futtatható szkripttel. + +Az útmutató a következőket tárgyalja: + +* Az Aspose.Barcode könyvtár verziójának lekérdezése (opcionális, de hibakereséshez hasznos). +* Kiterjesztett kódszöveg (codetext) string felépítése, amely egyszerű és ECI‑kódolt karaktereket kever. +* Vonalkód generátor létrehozása olyan szimbólumhoz, amely támogatja a kiterjesztett kódszöveget. +* A vonalkód méreteinek testreszabása és a végleges PNG fájl mentése. + +Külső dokumentáció nem szükséges; másold a kódot, futtasd, és kapsz egy vonalkód képet, amely kínai karaktereket tartalmaz ECI 26 (UTF‑8) kódolással. + +## Előkövetelmények + +Mielőtt elkezdenéd, győződj meg róla, hogy rendelkezel: + +* Python 3.8 vagy újabb telepítve. +* `aspose-barcode` csomag telepítve (`pip install aspose-barcode`). +* Írási jogosultsággal a mappához, ahová a PNG fájlt menteni szeretnéd. + +Ha virtuális környezetet használsz, először aktiváld, hogy a függőségek izoláltak maradjanak. + +## 1. lépés: Az Aspose.Barcode verzió ellenőrzése (opcionális) + +A pontos könyvtárverzió ismerete segít, ha hibákat kell jelenteni vagy funkciókat kell összehasonlítani a kiadások között. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Miért fontos*: A verziókimenet megerősíti, hogy a futtatókörnyezet megegyezik a követett dokumentációval. Különböző verziók eltérő ECI értékeket támogatnak, így ez egy gyors ellenőrzés. + +## 2. lépés: Kiterjesztett kódszöveg építése egyszerű és ECI‑kódolt részekkel + +Az Aspose.Barcode biztosítja a `ExtCodetextBuilder` osztályt az egyszerű adatok és az ECI‑kódolt szegmensek összefűzéséhez. Ebben a példában egy numerikus stringet keverünk kínai karakterekkel. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Magyarázat*: +* `add_plain_codetext` olyan adatot szúr be, amelyet a vonalkód szimbóluma egyszerű karakterként kezel. +* `add_eci_codetext` azt mondja a generátornak, hogy az adott szöveg előtt helyezzen el egy ECI indikátort (itt **26**, ami az UTF‑8-hoz tartozik). Ez pontosan **hogyan adjunk hozzá eci** adatot egy vonalkódhoz. + +Többször is meghívhatod a `add_eci_codetext`-et, hogy több különböző nyelvi blokkot ágyazz be. A builder automatikusan kezeli a szükséges escape szekvenciákat. + +## 3. lépés: Válassz szimbólumot, amely támogatja a kiterjesztett kódszöveget + +Nem minden vonalkódtípus képes ECI szegmenseket tárolni. A Code 128, QR és Data Matrix gyakori választások. A példa a Code 128-at használja, mivel széles körben támogatott és jól működik vegyes alfanumerikus adatok esetén. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Miért a Code 128?*: Elfogadja a teljes ASCII tartományt és a builder által előállított ECI escape szekvenciákat, így ideális a „hogyan generáljunk vonalkódot” szituációra, amely egyszerű és kódolt szöveget kever. + +## 4. lépés: A vonalkód megjelenésének beállítása + +A `parameters` objektum segítségével szabályozhatod a méretet, magasságot, margókat és számos egyéb vizuális jellemzőt. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tipp*: Ha a vonalkódot nyomtatni szeretnéd, növeld arányosan az `x_dimension` és `bar_height` értékeket, hogy a cél DPI-nél is olvasható maradjon. + +## 5. lépés: A vonalkód kép mentése + +Végül írd a generált képet egy fájlba. Az Aspose.Barcode támogatja a PNG, JPEG, BMP és számos egyéb formátumot. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Győződj meg róla, hogy az `output` mappa létezik, vagy hozd létre az `os.makedirs("output", exist_ok=True)` paranccsal a `save` hívása előtt. + +### Várható eredmény + +Amikor megnyitod a `extended_codetext.png` fájlt, egy Code 128 vonalkódot kell látnod, amely kódolja a `1234567890` numerikus stringet, majd a “特殊字符” kínai karaktereket. A vonalkód modern, ECI‑t támogató szkennerrel történő leolvasása visszaadja az eredeti kevert stringet. + +![Vonalkód generálva a hogyan generáljunk vonalkód példával](https://example.com/images/barcode-sample.png){: .align-center alt="Vonalkód generálva a hogyan generáljunk vonalkód példával"} + +## Gyakori kérdések és szélhelyzetek + +### Mi van, ha más karakterkészletre van szükségem? + +Válaszd ki a megfelelő ECI értéket az ISO/IEC 18004 táblázatból. Például az ECI 27 az ISO‑8859‑1 (Latin‑1) karakterkészletet jelenti. Ennek megfelelően cseréld ki a numerikus azonosítót a `add_eci_codetext`-ben. + +### Beágyazhatok több mint egy ECI blokkot? + +Igen. Hívjad többször a `add_eci_codetext`-et. A builder a szükséges ECI váltó kódokat helyezi el a blokkok között, megőrizve a hozzáadás sorrendjét. + +### Támogatja a generátor a QR kódokat ECI-vel? + +Teljesen. Cseréld le a `barcode.Symbology.CODE_128`-t `barcode.Symbology.QR`-ra, és állítsd be a QR‑specifikus paramétereket (pl. hibajavítási szint) a `generator.parameters.qr` segítségével. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Hogyan kezeljünk nagyon hosszú adatstringeket? + +Lineáris vonalkódok, mint a Code 128 esetén, a kiterjesztett kódszöveg használatakor a maximális hossz körülbelül 80 karakter. Ha ezt meghaladod, fontold meg egy kétdimenziós szimbólumra, például QR vagy Data Matrix váltást, amelyek több ezer karaktert is tárolhatnak. + +## Teljes, futtatható szkript + +Az alábbiakban a teljes program található, amelyet átmásolhatsz egy `generate_extended_barcode.py` nevű fájlba, és közvetlenül futtathatsz. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Mit érdemes legközelebb megtanulni? + +A következő oktatóanyagok szorosan kapcsolódó témákat fednek le, amelyek a jelen útmutatóban bemutatott technikákra épülnek. Minden forrás tartalmaz teljes, működő kódrészleteket lépésről‑lépésre magyarázatokkal, hogy elsajátíthasd a további API funkciókat és alternatív megvalósítási megközelítéseket a saját projektjeidben. + +- [Hogyan generáljunk vonalkód képet kiegészítő tér testreszabásával az Aspose.BarCode használatával](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Hogyan generáljunk vonalkód képet Java-ban az Aspose.BarCode használatával](/barcode/english/java/barcode-rendering-techniques/) +- [Hogyan generáljunk DataMatrix vonalkódot az Aspose.BarCode .NET számára](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/indonesian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/indonesian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..173386b62 --- /dev/null +++ b/barcode/indonesian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Cara menghasilkan barcode dengan ECI menggunakan Aspose.Barcode untuk + Python. Pelajari cara menambahkan data ECI, mencampur teks biasa, dan menyimpan + gambar dalam satu panduan yang jelas. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: id +lastmod: 2026-08-19 +og_description: Cara menghasilkan barcode dengan ECI menggunakan Aspose.Barcode untuk + Python. Ikuti tutorial ini untuk mempelajari cara menambahkan data ECI, menyesuaikan + tampilan, dan menyimpan hasilnya. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Cara menghasilkan barcode dengan ECI menggunakan Aspose.Barcode Python – + langkah demi langkah +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Cara menghasilkan barcode dengan ECI menggunakan Aspose.Barcode Python +url: /id/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cara menghasilkan barcode dengan ECI menggunakan Aspose.Barcode Python + +Jika Anda perlu mengetahui **cara menghasilkan barcode** yang berisi karakter biasa dan data yang dienkode dengan ECI, panduan ini menunjukkan proses lengkapnya. Anda akan melihat secara tepat **cara menambahkan eci** pada bagian, menyesuaikan ukuran, dan menulis gambar ke disk dengan satu skrip yang dapat dijalankan. + +Tutorial ini mencakup: + +* Mengambil versi pustaka Aspose.Barcode (opsional tetapi berguna untuk debugging). +* Membuat string codetext ekstended yang mencampur karakter biasa dan karakter yang dienkode ECI. +* Membuat generator barcode untuk simbol yang mendukung codetext ekstended. +* Menyesuaikan dimensi barcode dan menyimpan file PNG akhir. + +Tidak diperlukan dokumentasi eksternal; salin kode, jalankan, dan Anda akan mendapatkan gambar barcode yang mencakup karakter Cina yang dienkode dengan ECI 26 (UTF‑8). + +## Prasyarat + +Sebelum memulai, pastikan Anda memiliki: + +* Python 3.8 atau lebih baru terpasang. +* Paket `aspose-barcode` terpasang (`pip install aspose-barcode`). +* Izin menulis ke folder tempat Anda berencana menyimpan file PNG. + +Jika Anda menggunakan lingkungan virtual, aktifkan terlebih dahulu untuk menjaga ketergantungan terisolasi. + +## Langkah 1: Verifikasi versi Aspose.Barcode (opsional) + +Mengetahui versi pustaka yang tepat membantu ketika Anda perlu melaporkan bug atau membandingkan fitur antar rilis. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Mengapa ini penting*: Output versi mengonfirmasi bahwa runtime cocok dengan dokumentasi yang Anda ikuti. Versi yang berbeda mungkin mendukung nilai ECI yang berbeda, sehingga ini merupakan pemeriksaan cepat. + +## Langkah 2: Bangun codetext ekstended dengan bagian biasa dan ECI‑encoded + +Aspose.Barcode menyediakan `ExtCodetextBuilder` untuk menggabungkan data biasa dan segmen yang dienkode ECI. Pada contoh ini kami mencampur string numerik dengan karakter Cina. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Penjelasan*: +* `add_plain_codetext` menyisipkan data yang dianggap simbol barcode sebagai karakter biasa. +* `add_eci_codetext` memberi tahu generator untuk menambahkan indikator ECI (di sini **26**, yang berhubungan dengan UTF‑8) sebelum teks yang diberikan. Ini adalah cara **menambahkan eci** ke barcode. + +Anda dapat memanggil `add_eci_codetext` beberapa kali untuk menyematkan beberapa blok bahasa yang berbeda. Builder secara otomatis menangani urutan escape yang diperlukan. + +## Langkah 3: Pilih simbol yang mendukung codetext ekstended + +Tidak semua jenis barcode dapat menyimpan segmen ECI. Code 128, QR, dan Data Matrix adalah pilihan umum. Contoh ini menggunakan Code 128 karena didukung secara luas dan bekerja baik untuk data alfanumerik campuran. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Mengapa Code 128?*: Ia menerima seluruh rentang ASCII dan urutan escape ECI yang dihasilkan oleh builder, menjadikannya ideal untuk skenario “cara menghasilkan barcode” yang mencampur teks biasa dan teks yang dienkode. + +## Langkah 4: Sesuaikan tampilan barcode + +Anda dapat mengontrol ukuran, tinggi, margin, dan banyak aspek visual lainnya melalui objek `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: Jika Anda berencana mencetak barcode, tingkatkan `x_dimension` dan `bar_height` secara proporsional untuk menjaga keterbacaan pada DPI target. + +## Langkah 5: Simpan gambar barcode + +Akhirnya, tulis gambar yang dihasilkan ke sebuah file. Aspose.Barcode mendukung PNG, JPEG, BMP, dan banyak format lainnya. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Pastikan folder `output` ada atau buat dengan `os.makedirs("output", exist_ok=True)` sebelum memanggil `save`. + +### Hasil yang diharapkan + +Saat Anda membuka `extended_codetext.png`, Anda akan melihat barcode Code 128 yang mengkodekan string numerik `1234567890` diikuti oleh karakter Cina “特殊字符”. Memindai barcode dengan pemindai modern yang menghormati ECI akan mengembalikan string campuran asli. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode yang dihasilkan dengan contoh cara menghasilkan barcode"} + +## Pertanyaan umum dan kasus tepi + +### Bagaimana jika saya membutuhkan set karakter yang berbeda? + +Pilih nilai ECI yang sesuai dari tabel ISO/IEC 18004. Misalnya, ECI 27 mewakili ISO‑8859‑1 (Latin‑1). Ganti pengenal numerik dalam `add_eci_codetext` sesuai. + +### Bisakah saya menyematkan lebih dari satu blok ECI? + +Ya. Panggil `add_eci_codetext` beberapa kali. Builder menyisipkan kode switch ECI yang diperlukan di antara blok, mempertahankan urutan yang Anda tambahkan. + +### Apakah generator mendukung kode QR dengan ECI? + +Tentu saja. Ganti `barcode.Symbology.CODE_128` dengan `barcode.Symbology.QR` dan sesuaikan parameter khusus QR (mis., tingkat koreksi kesalahan) melalui `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Bagaimana menangani string data yang sangat panjang? + +Untuk barcode linear seperti Code 128, panjang maksimum sekitar 80 karakter saat menggunakan codetext ekstended. Jika Anda melebihi itu, pertimbangkan beralih ke simbol dua‑dimensi seperti QR atau Data Matrix, yang dapat menyimpan ribuan karakter. + +## Skrip lengkap yang dapat dijalankan + +Berikut adalah program lengkap yang dapat Anda salin‑tempel ke file bernama `generate_extended_barcode.py` dan jalankan langsung. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik yang sangat terkait yang membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber daya menyertakan contoh kode lengkap yang berfungsi dengan penjelasan langkah demi langkah untuk membantu Anda menguasai fitur API tambahan dan mengeksplorasi pendekatan implementasi alternatif dalam proyek Anda sendiri. + +- [Cara Menghasilkan Gambar Barcode dengan Kustomisasi Ruang Tambahan menggunakan Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Cara Menghasilkan Gambar Barcode dalam Java dengan Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Cara menghasilkan barcode DataMatrix dengan Aspose.BarCode untuk .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/italian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/italian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..8694fe64f --- /dev/null +++ b/barcode/italian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Come generare un codice a barre con ECI usando Aspose.Barcode per Python. + Scopri come aggiungere dati ECI, mescolare testo semplice e salvare l'immagine in + una guida chiara. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: it +lastmod: 2026-08-19 +og_description: Come generare un codice a barre con ECI usando Aspose.Barcode per + Python. Segui questo tutorial per imparare come aggiungere dati ECI, personalizzare + l'aspetto e salvare il risultato. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Come generare un codice a barre con ECI usando Aspose.Barcode Python – passo + dopo passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Come generare un codice a barre con ECI usando Aspose.Barcode Python +url: /it/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Come generare un barcode con ECI usando Aspose.Barcode Python + +Se hai bisogno di sapere **come generare un barcode** che contenga sia caratteri semplici sia dati codificati ECI, questa guida mostra l'intero processo. Vedrai esattamente **come aggiungere eci** alle sezioni, regolare le dimensioni e scrivere l'immagine su disco con un unico script eseguibile. + +Il tutorial copre: + +* Recuperare la versione della libreria Aspose.Barcode (opzionale ma utile per il debug). +* Costruire una stringa di codetext esteso che mescola caratteri semplici e codificati ECI. +* Creare un generatore di barcode per una simbologia che supporta il codetext esteso. +* Personalizzare le dimensioni del barcode e salvare il file PNG finale. + +Non è necessaria alcuna documentazione esterna; copia il codice, eseguilo e otterrai un'immagine di barcode che include caratteri cinesi codificati con ECI 26 (UTF‑8). + +## Prerequisiti + +Prima di iniziare, assicurati di avere: + +* Python 3.8 o versioni successive installate. +* pacchetto `aspose-barcode` installato (`pip install aspose-barcode`). +* Permesso di scrittura sulla cartella in cui intendi salvare il file PNG. + +Se stai usando un ambiente virtuale, attivalo prima per mantenere le dipendenze isolate. + +## Passo 1: Verifica la versione di Aspose.Barcode (opzionale) + +Conoscere la versione esatta della libreria aiuta quando è necessario segnalare bug o confrontare le funzionalità tra versioni. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Perché è importante*: L'output della versione conferma che il runtime corrisponde alla documentazione che stai seguendo. Versioni diverse possono supportare valori ECI diversi, quindi è un rapido controllo di coerenza. + +## Passo 2: Costruisci un codetext esteso con parti semplici ed ECI‑codificate + +Aspose.Barcode fornisce `ExtCodetextBuilder` per concatenare dati semplici e segmenti codificati ECI. In questo esempio mescoliamo una stringa numerica con caratteri cinesi. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Spiegazione*: +* `add_plain_codetext` inserisce dati che la simbologia del barcode tratta come caratteri ordinari. +* `add_eci_codetext` indica al generatore di anteporre un indicatore ECI (qui **26**, che corrisponde a UTF‑8) prima del testo fornito. Questo è esattamente **come aggiungere eci** dati a un barcode. + +Puoi chiamare `add_eci_codetext` più volte per incorporare diversi blocchi linguistici. Il builder gestisce automaticamente le sequenze di escape necessarie. + +## Passo 3: Scegli una simbologia che supporta il codetext esteso + +Non tutti i tipi di barcode possono memorizzare segmenti ECI. Code 128, QR e Data Matrix sono scelte comuni. L'esempio utilizza Code 128 perché è ampiamente supportato e funziona bene per dati alfanumerici misti. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Perché Code 128?*: Accetta l'intero intervallo ASCII e le sequenze di escape ECI prodotte dal builder, rendendolo ideale per lo scenario “come generare barcode” che mescola testo semplice e codificato. + +## Passo 4: Regola l'aspetto del barcode + +Puoi controllare dimensioni, altezza, margini e molti altri aspetti visivi tramite l'oggetto `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Consiglio*: Se prevedi di stampare il barcode, aumenta `x_dimension` e `bar_height` proporzionalmente per mantenere la leggibilità al DPI target. + +## Passo 5: Salva l'immagine del barcode + +Infine, scrivi l'immagine generata su un file. Aspose.Barcode supporta PNG, JPEG, BMP e molti altri formati. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Assicurati che la cartella `output` esista o creala con `os.makedirs("output", exist_ok=True)` prima di chiamare `save`. + +### Risultato atteso + +Quando apri `extended_codetext.png`, dovresti vedere un barcode Code 128 che codifica la stringa numerica `1234567890` seguita dai caratteri cinesi “特殊字符”. Scansionando il barcode con uno scanner moderno che rispetta l'ECI, otterrai la stringa mista originale. + +![Barcode generato con l'esempio di come generare barcode](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode generato con l'esempio di come generare barcode"} + +## Domande comuni e casi particolari + +### E se ho bisogno di un diverso set di caratteri? + +Scegli il valore ECI appropriato dalla tabella ISO/IEC 18004. Ad esempio, ECI 27 rappresenta ISO‑8859‑1 (Latin‑1). Sostituisci l'identificatore numerico in `add_eci_codetext` di conseguenza. + +### Posso incorporare più di un blocco ECI? + +Sì. Chiama `add_eci_codetext` più volte. Il builder inserisce i codici di commutazione ECI necessari tra i blocchi, preservando l'ordine in cui li aggiungi. + +### Il generatore supporta i codici QR con ECI? + +Assolutamente. Sostituisci `barcode.Symbology.CODE_128` con `barcode.Symbology.QR` e regola eventuali parametri specifici del QR (ad esempio, livello di correzione degli errori) tramite `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Come gestire stringhe di dati molto lunghe? + +Per i barcode lineari come Code 128, la lunghezza massima è di circa 80 caratteri quando si utilizza il codetext esteso. Se superi questo limite, considera di passare a una simbologia bidimensionale come QR o Data Matrix, che può memorizzare migliaia di caratteri. + +## Script completo e eseguibile + +Di seguito trovi il programma completo che puoi copiare‑incollare in un file chiamato `generate_extended_barcode.py` ed eseguire direttamente. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Cosa dovresti imparare dopo? + +I tutorial seguenti coprono argomenti strettamente correlati che si basano sulle tecniche dimostrate in questa guida. Ogni risorsa include esempi di codice completi e funzionanti con spiegazioni passo passo per aiutarti a padroneggiare funzionalità API aggiuntive ed esplorare approcci di implementazione alternativi nei tuoi progetti. + +- [Come generare un'immagine di barcode con personalizzazione dello spazio supplementare usando Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Come generare un'immagine di barcode in Java con Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Come generare un barcode DataMatrix con Aspose.BarCode per .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/japanese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/japanese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..e7dfc82d6 --- /dev/null +++ b/barcode/japanese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,255 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.Barcode for Python を使用して ECI 付きバーコードを生成する方法。ECI データの追加、プレーンテキストとの混合、画像の保存方法を一つの分かりやすいガイドで学びましょう。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: ja +lastmod: 2026-08-19 +og_description: Aspose.Barcode for Python を使用して ECI 付きのバーコードを生成する方法。このチュートリアルで、ECI + データの追加方法、外観のカスタマイズ、結果の保存方法を学びましょう。 +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Aspose.Barcode Python を使用して ECI 付きバーコードを生成する方法 – ステップバイステップ +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Aspose.Barcode Python を使用して ECI 付きバーコードを生成する方法 +url: /ja/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Aspose.Barcode Python を使用した ECI 付きバーコードの生成方法 + +プレーン文字と ECI エンコードされたデータの両方を含む **バーコードの生成方法** を知りたい場合、このガイドでは全工程を示します。**ECI を追加する方法**、サイズ調整、画像をディスクに書き出す単一の実行可能スクリプトの手順が正確に分かります。 + +このチュートリアルで扱う内容: + +* Aspose.Barcode ライブラリのバージョン取得(オプションだがデバッグに便利)。 +* プレーン文字と ECI エンコード文字を混在させた拡張コードテキスト文字列の構築。 +* 拡張コードテキストをサポートするシンボロジー用のバーコードジェネレータの作成。 +* バーコードのサイズカスタマイズと最終 PNG ファイルの保存。 + +外部ドキュメントは不要です。コードをコピーして実行すれば、ECI 26(UTF‑8)でエンコードされた中国語文字を含むバーコード画像が得られます。 + +## 前提条件 + +開始する前に、以下が揃っていることを確認してください。 + +* Python 3.8 以上がインストールされていること。 +* `aspose-barcode` パッケージがインストールされていること(`pip install aspose-barcode`)。 +* PNG ファイルを保存するフォルダーへの書き込み権限があること。 + +仮想環境を使用している場合は、依存関係を分離するためにまずそれをアクティブ化してください。 + +## 手順 1: Aspose.Barcode のバージョンを確認する(オプション) + +正確なライブラリバージョンを把握しておくと、バグ報告やリリース間の機能比較に役立ちます。 + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*なぜ重要か*: バージョン出力は、実行環境が参照しているドキュメントと一致していることを確認します。バージョンによってサポートされる ECI 値が異なる可能性があるため、簡単なチェックになります。 + +## 手順 2: プレーン部分と ECI エンコード部分を組み合わせた拡張コードテキストの構築 + +Aspose.Barcode は `ExtCodetextBuilder` を提供し、プレーンデータと ECI エンコードセグメントを連結できます。この例では数値文字列と中国語文字を混在させます。 + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*説明*: +* `add_plain_codetext` は、バーコードシンボロジーが通常の文字として扱うデータを挿入します。 +* `add_eci_codetext` は、提供されたテキストの前に ECI インジケータ(ここでは UTF‑8 に対応する **26**)を付加するようジェネレータに指示します。これがバーコードに **ECI データを追加する方法** です。 + +`add_eci_codetext` を複数回呼び出すことで、複数の異なる言語ブロックを埋め込むことができます。ビルダーは必要なエスケープシーケンスを自動的に処理します。 + +## 手順 3: 拡張コードテキストをサポートするシンボロジーを選択する + +すべてのバーコードタイプが ECI セグメントを格納できるわけではありません。Code 128、QR、Data Matrix が一般的な選択肢です。例では、広くサポートされており、プレーンとエンコードされたデータの混在に適した Code 128 を使用します。 + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*なぜ Code 128 か*: ビルダーが生成する ECI エスケープシーケンスと全 ASCII 範囲を受け入れるため、プレーンテキストとエンコードテキストを混在させる「バーコード生成」シナリオに最適です。 + +## 手順 4: バーコードの外観を調整する + +`parameters` オブジェクトを介してサイズ、高さ、余白など多くの視覚的側面を制御できます。 + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*ヒント*: バーコードを印刷する場合は、目標 DPI での可読性を保つために `x_dimension` と `bar_height` を比例して増やしてください。 + +## 手順 5: バーコード画像を保存する + +最後に、生成された画像をファイルに書き出します。Aspose.Barcode は PNG、JPEG、BMP など多数の形式をサポートしています。 + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +`save` を呼び出す前に、`output` フォルダーが存在することを確認するか、`os.makedirs("output", exist_ok=True)` で作成してください。 + +### 期待される結果 + +`extended_codetext.png` を開くと、数値文字列 `1234567890` の後に中国語文字「特殊字符」をエンコードした Code 128 バーコードが表示されます。ECI を認識する最新のスキャナーで読み取ると、元の混合文字列が返ります。 + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="バーコード生成例の画像"} + +## よくある質問とエッジケース + +### 別の文字セットが必要な場合は? + +ISO/IEC 18004 テーブルから適切な ECI 値を選択してください。例として、ECI 27 は ISO‑8859‑1(Latin‑1)を表します。`add_eci_codetext` の数値識別子をそれに合わせて置き換えます。 + +### 複数の ECI ブロックを埋め込めますか? + +はい。`add_eci_codetext` を複数回呼び出します。ビルダーはブロック間に必要な ECI スイッチコードを挿入し、追加した順序を保持します。 + +### ジェネレータは ECI を使用した QR コードをサポートしていますか? + +もちろんです。`barcode.Symbology.CODE_128` を `barcode.Symbology.QR` に置き換え、`generator.parameters.qr` を介して QR 固有のパラメータ(例: 誤り訂正レベル)を調整してください。 + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### 非常に長いデータ文字列を扱うには? + +Code 128 のような一次元バーコードでは、拡張コードテキスト使用時の最大長は約 80 文字です。それを超える場合は、数千文字を格納できる QR や Data Matrix といった二次元シンボロジーへの切り替えを検討してください。 + +## 完全な実行可能スクリプト + +以下は `generate_extended_barcode.py` というファイル名でコピー&ペーストし、直接実行できる完全なプログラムです。 + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックをカバーしています。各リソースには、ステップバイステップの解説と完全な動作コード例が含まれており、追加の API 機能を習得し、独自プロジェクトで代替実装アプローチを探求するのに役立ちます。 + +- [Aspose.BarCode を使用した補足スペースカスタマイズ付きバーコード画像の生成方法](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Aspose.BarCode を使用した Java でのバーコード画像生成方法](/barcode/english/java/barcode-rendering-techniques/) +- [.NET 用 Aspose.BarCode で DataMatrix バーコードを生成する方法](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/korean/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/korean/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..7c1198ede --- /dev/null +++ b/barcode/korean/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,256 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.Barcode for Python을 사용하여 ECI가 포함된 바코드를 생성하는 방법. ECI 데이터를 추가하고 + 일반 텍스트와 혼합하며 이미지를 저장하는 방법을 한눈에 보기 쉬운 가이드에서 배워보세요. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: ko +lastmod: 2026-08-19 +og_description: Aspose.Barcode for Python을 사용하여 ECI가 포함된 바코드를 생성하는 방법. 이 튜토리얼을 따라 + ECI 데이터를 추가하고, 모양을 사용자 정의하며, 결과를 저장하는 방법을 배워보세요. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Aspose.Barcode Python을 사용하여 ECI가 포함된 바코드 생성 방법 – 단계별 +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Aspose.Barcode Python을 사용하여 ECI가 포함된 바코드 생성 방법 +url: /ko/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# ECI를 사용하여 Aspose.Barcode Python으로 바코드 생성 방법 + +일반 문자와 ECI‑인코딩된 데이터를 모두 포함하는 **바코드 생성 방법**을 알아야 한다면, 이 가이드는 전체 과정을 보여줍니다. **how to add eci** 섹션을 정확히 어떻게 추가하고, 크기를 조정하며, 단일 실행 가능한 스크립트로 이미지를 디스크에 저장하는지 확인할 수 있습니다. + +이 튜토리얼에서는 다음을 다룹니다: + +* Aspose.Barcode 라이브러리 버전 확인 (선택 사항이지만 디버깅에 유용) +* 일반 문자와 ECI‑인코딩된 문자를 혼합한 확장 코드텍스트 문자열 만들기 +* 확장 코드텍스트를 지원하는 심볼로지를 위한 바코드 생성기 생성 +* 바코드 크기 조정 및 최종 PNG 파일 저장 + +외부 문서를 참조할 필요 없이 코드를 복사해 실행하면, ECI 26(UTF‑8)으로 인코딩된 중국어 문자를 포함한 바코드 이미지를 얻을 수 있습니다. + +## Prerequisites + +시작하기 전에 다음이 준비되어 있는지 확인하세요: + +* Python 3.8 이상이 설치되어 있음 +* `aspose-barcode` 패키지 설치 (`pip install aspose-barcode`) +* PNG 파일을 저장하려는 폴더에 대한 쓰기 권한 + +가상 환경을 사용 중이라면, 의존성을 격리하기 위해 먼저 환경을 활성화하세요. + +## Step 1: Verify the Aspose.Barcode version (optional) + +정확한 라이브러리 버전을 알면 버그를 보고하거나 릴리스 간 기능을 비교할 때 도움이 됩니다. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Why this matters*: 버전 출력은 현재 실행 환경이 참고하고 있는 문서와 일치함을 확인시켜 줍니다. 버전에 따라 지원되는 ECI 값이 다를 수 있으므로 간단한 검증 단계가 됩니다. + +## Step 2: Build an extended codetext with plain and ECI‑encoded parts + +Aspose.Barcode는 일반 데이터와 ECI‑인코딩된 구간을 연결하기 위해 `ExtCodetextBuilder`를 제공합니다. 이 예제에서는 숫자 문자열과 중국어 문자를 혼합합니다. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explanation*: +* `add_plain_codetext`는 바코드 심볼로지가 일반 문자로 처리하는 데이터를 삽입합니다. +* `add_eci_codetext`는 생성기에 ECI 표시자(여기서는 **26**, UTF‑8에 해당)를 제공된 텍스트 앞에 추가하도록 지시합니다. 이는 바로 **how to add eci** 데이터를 바코드에 삽입하는 방법입니다. + +`add_eci_codetext`를 여러 번 호출하면 서로 다른 언어 블록을 여러 개 삽입할 수 있습니다. 빌더는 필요한 이스케이프 시퀀스를 자동으로 처리합니다. + +## Step 3: Choose a symbology that supports extended codetext + +모든 바코드 유형이 ECI 구간을 저장할 수 있는 것은 아닙니다. Code 128, QR, Data Matrix 등이 일반적인 선택입니다. 예제에서는 널리 지원되고 혼합 알파벳-숫자 데이터를 잘 처리하는 Code 128을 사용합니다. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Why Code 128?*: 전체 ASCII 범위와 빌더가 생성하는 ECI 이스케이프 시퀀스를 모두 허용하므로, 일반 문자와 인코딩된 텍스트를 혼합하는 “how to generate barcode” 시나리오에 이상적입니다. + +## Step 4: Adjust barcode appearance + +`parameters` 객체를 통해 크기, 높이, 여백 등 다양한 시각적 요소를 제어할 수 있습니다. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tip*: 바코드를 인쇄할 계획이라면 목표 DPI에서 가독성을 유지하도록 `x_dimension`과 `bar_height`를 비례적으로 늘리세요. + +## Step 5: Save the barcode image + +마지막으로 생성된 이미지를 파일에 저장합니다. Aspose.Barcode는 PNG, JPEG, BMP 등 여러 포맷을 지원합니다. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +`save`를 호출하기 전에 `output` 폴더가 존재하는지 확인하거나 `os.makedirs("output", exist_ok=True)`로 생성하세요. + +### Expected result + +`extended_codetext.png` 파일을 열면 숫자 문자열 `1234567890` 뒤에 중국어 문자 “特殊字符”가 인코딩된 Code 128 바코드가 표시됩니다. ECI를 인식하는 최신 스캐너로 바코드를 스캔하면 원래의 혼합 문자열이 반환됩니다. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="바코드 생성 예제와 함께 생성된 바코드"} + +## Common questions and edge cases + +### What if I need a different character set? + +ISO/IEC 18004 표에서 적절한 ECI 값을 선택하세요. 예를 들어, ECI 27은 ISO‑8859‑1(Latin‑1)을 나타냅니다. `add_eci_codetext`의 숫자 식별자를 해당 값으로 교체하면 됩니다. + +### Can I embed more than one ECI block? + +예. `add_eci_codetext`를 여러 번 호출하면 됩니다. 빌더가 블록 사이에 필요한 ECI 전환 코드를 삽입해 주어, 추가한 순서를 그대로 유지합니다. + +### Does the generator support QR codes with ECI? + +물론입니다. `barcode.Symbology.CODE_128`을 `barcode.Symbology.QR`로 교체하고, `generator.parameters.qr`를 통해 QR‑전용 매개변수(예: 오류 정정 수준)를 조정하면 됩니다. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### How to handle very long data strings? + +Code 128과 같은 1차원 바코드의 경우, 확장 코드텍스트를 사용할 때 최대 길이는 약 80 문자입니다. 이를 초과하면 QR 또는 Data Matrix와 같은 2차원 심볼로지로 전환하는 것이 좋으며, 수천 문자를 저장할 수 있습니다. + +## Full, runnable script + +아래는 `generate_extended_barcode.py`라는 파일에 복사‑붙여넣기 한 뒤 바로 실행할 수 있는 전체 프로그램입니다. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## What Should You Learn Next? + +다음 튜토리얼들은 이 가이드에서 시연한 기술을 기반으로 하여 밀접하게 관련된 주제를 다룹니다. 각 자료에는 완전한 동작 코드 예제와 단계별 설명이 포함되어 있어, 추가 API 기능을 마스터하고 프로젝트에 적용할 수 있는 다양한 구현 방식을 탐색하는 데 도움이 됩니다. + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode Image in Java with Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [How to generate DataMatrix barcode with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/polish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/polish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..ca22b4667 --- /dev/null +++ b/barcode/polish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,260 @@ +--- +category: general +date: 2026-08-19 +description: Jak generować kod kreskowy z ECI przy użyciu Aspose.Barcode dla Pythona. + Dowiedz się, jak dodać dane ECI, połączyć zwykły tekst i zapisać obraz w jednym + przejrzystym przewodniku. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: pl +lastmod: 2026-08-19 +og_description: Jak generować kod kreskowy z ECI przy użyciu Aspose.Barcode dla Pythona. + Skorzystaj z tego samouczka, aby dowiedzieć się, jak dodać dane ECI, dostosować + wygląd i zapisać wynik. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Jak wygenerować kod kreskowy z ECI przy użyciu Aspose.Barcode w Pythonie + – krok po kroku +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Jak wygenerować kod kreskowy z ECI przy użyciu Aspose.Barcode w Pythonie +url: /pl/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Jak generować kod kreskowy z ECI przy użyciu Aspose.Barcode w Pythonie + +Jeśli potrzebujesz wiedzieć **jak generować kod kreskowy**, który zawiera zarówno zwykłe znaki, jak i dane zakodowane przy użyciu ECI, ten przewodnik pokazuje cały proces. Zobaczysz dokładnie **jak dodać eci** sekcje, dostosujesz rozmiar i zapiszesz obraz na dysku przy użyciu jednego, uruchamialnego skryptu. + +Tutorial obejmuje: + +* Pobieranie wersji biblioteki Aspose.Barcode (opcjonalne, ale przydatne przy debugowaniu). +* Budowanie rozszerzonego ciągu kodowego, który miesza zwykłe i zakodowane w ECI znaki. +* Tworzenie generatora kodu kreskowego dla symbologii obsługującej rozszerzony ciąg kodowy. +* Dostosowywanie wymiarów kodu kreskowego i zapisywanie finalnego pliku PNG. + +Nie wymaga żadnej zewnętrznej dokumentacji; skopiuj kod, uruchom go i otrzymasz obraz kodu kreskowego, który zawiera chińskie znaki zakodowane przy użyciu ECI 26 (UTF‑8). + +## Wymagania wstępne + +Zanim rozpoczniesz, upewnij się, że masz: + +* Python 3.8 lub nowszy zainstalowany. +* Pakiet `aspose-barcode` zainstalowany (`pip install aspose-barcode`). +* Uprawnienia do zapisu w folderze, w którym zamierzasz zapisać plik PNG. + +Jeśli używasz środowiska wirtualnego, najpierw je aktywuj, aby utrzymać zależności w izolacji. + +## Krok 1: Zweryfikuj wersję Aspose.Barcode (opcjonalnie) + +Znajomość dokładnej wersji biblioteki pomaga, gdy musisz zgłaszać błędy lub porównywać funkcje między wydaniami. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Dlaczego to jest ważne*: Wyświetlona wersja potwierdza, że środowisko uruchomieniowe odpowiada dokumentacji, której używasz. Różne wersje mogą obsługiwać różne wartości ECI, więc jest to szybka kontrola poprawności. + +## Krok 2: Zbuduj rozszerzony ciąg kodowy z częściami zwykłymi i zakodowanymi w ECI + +Aspose.Barcode udostępnia `ExtCodetextBuilder` do łączenia zwykłych danych i segmentów zakodowanych w ECI. W tym przykładzie mieszamy ciąg liczbowy z chińskimi znakami. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Wyjaśnienie*: +* `add_plain_codetext` wstawia dane, które symbologia kodu kreskowego traktuje jako zwykłe znaki. +* `add_eci_codetext` instruuje generator, aby przed dostarczonym tekstem dodał wskaźnik ECI (tutaj **26**, który mapuje na UTF‑8). To jest dokładnie **jak dodać eci** dane do kodu kreskowego. + +Możesz wywołać `add_eci_codetext` wielokrotnie, aby osadzić kilka różnych bloków językowych. Builder automatycznie obsługuje wymagane sekwencje ucieczki. + +## Krok 3: Wybierz symbologię obsługującą rozszerzony ciąg kodowy + +Nie każdy typ kodu kreskowego może przechowywać segmenty ECI. Code 128, QR i Data Matrix są popularnymi wyborami. Przykład używa Code 128, ponieważ jest szeroko wspierany i dobrze radzi sobie z mieszanymi danymi alfanumerycznymi. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Dlaczego Code 128?*: Akceptuje pełny zakres ASCII oraz sekwencje ucieczki ECI generowane przez builder, co czyni go idealnym dla scenariusza „jak generować kod kreskowy”, w którym mieszane są zwykłe i zakodowane znaki. + +## Krok 4: Dostosuj wygląd kodu kreskowego + +Możesz kontrolować rozmiar, wysokość, marginesy i wiele innych aspektów wizualnych za pomocą obiektu `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Wskazówka*: Jeśli planujesz drukować kod kreskowy, zwiększ `x_dimension` i `bar_height` proporcjonalnie, aby zachować czytelność przy docelowej rozdzielczości DPI. + +## Krok 5: Zapisz obraz kodu kreskowego + +Na koniec zapisz wygenerowany obraz do pliku. Aspose.Barcode obsługuje PNG, JPEG, BMP i wiele innych formatów. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Upewnij się, że folder `output` istnieje lub utwórz go poleceniem `os.makedirs("output", exist_ok=True)` przed wywołaniem `save`. + +### Oczekiwany rezultat + +Po otwarciu pliku `extended_codetext.png` powinieneś zobaczyć kod kreskowy Code 128, który koduje ciąg liczbowy `1234567890` oraz chińskie znaki „特殊字符”. Zeskanowanie kodu nowoczesnym skanerem respektującym ECI zwróci oryginalny mieszany ciąg. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Kod kreskowy wygenerowany w przykładzie jak generować kod kreskowy"} + +## Częste pytania i przypadki brzegowe + +### Co zrobić, jeśli potrzebuję innego zestawu znaków? + +Wybierz odpowiednią wartość ECI z tabeli ISO/IEC 18004. Na przykład ECI 27 reprezentuje ISO‑8859‑1 (Latin‑1). Zastąp numeryczny identyfikator w `add_eci_codetext` odpowiednio. + +### Czy mogę osadzić więcej niż jeden blok ECI? + +Tak. Wywołaj `add_eci_codetext` wielokrotnie. Builder wstawia niezbędne kody przełączania ECI między blokami, zachowując kolejność, w jakiej je dodajesz. + +### Czy generator obsługuje kody QR z ECI? + +Oczywiście. Zastąp `barcode.Symbology.CODE_128` przez `barcode.Symbology.QR` i dostosuj wszelkie parametry specyficzne dla QR (np. poziom korekcji błędów) za pomocą `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Jak radzić sobie z bardzo długimi ciągami danych? + +Dla kodów liniowych, takich jak Code 128, maksymalna długość wynosi około 80 znaków przy użyciu rozszerzonego ciągu kodowego. Jeśli przekroczysz tę granicę, rozważ przejście na symbologię dwuwymiarową, taką jak QR lub Data Matrix, które mogą przechowywać tysiące znaków. + +## Pełny, uruchamialny skrypt + +Poniżej znajduje się kompletny program, który możesz skopiować‑wkleić do pliku o nazwie `generate_extended_barcode.py` i uruchomić bezpośrednio. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Co powinieneś nauczyć się dalej? + + +Poniższe tutoriale obejmują ściśle powiązane tematy, które rozwijają techniki przedstawione w tym przewodniku. Każde źródło zawiera kompletne działające przykłady kodu z wyjaśnieniami krok po kroku, aby pomóc Ci opanować dodatkowe funkcje API i odkrywać alternatywne podejścia implementacyjne w własnych projektach. + +- [Jak wygenerować obraz kodu kreskowego z dostosowaniem dodatkowej przestrzeni przy użyciu Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Jak wygenerować obraz kodu kreskowego w Javie przy użyciu Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Jak wygenerować kod DataMatrix przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/portuguese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/portuguese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..9b29e5568 --- /dev/null +++ b/barcode/portuguese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Como gerar código de barras com ECI usando Aspose.Barcode para Python. + Aprenda como adicionar dados ECI, combinar texto simples e salvar a imagem em um + guia claro. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: pt +lastmod: 2026-08-19 +og_description: Como gerar código de barras com ECI usando Aspose.Barcode para Python. + Siga este tutorial para aprender a adicionar dados ECI, personalizar a aparência + e salvar o resultado. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Como gerar código de barras com ECI usando Aspose.Barcode Python – passo + a passo +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Como gerar código de barras com ECI usando Aspose.Barcode Python +url: /pt/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Como gerar código de barras com ECI usando Aspose.Barcode Python + +Se você precisa saber **como gerar código de barras** que contenha tanto caracteres simples quanto dados codificados em ECI, este guia mostra o processo completo. Você verá exatamente **como adicionar eci** nas seções, ajustar o tamanho e gravar a imagem no disco com um único script executável. + +O tutorial aborda: + +* Recuperar a versão da biblioteca Aspose.Barcode (opcional, mas útil para depuração). +* Construir uma string de codetexto estendido que mistura caracteres simples e codificados em ECI. +* Criar um gerador de código de barras para uma simbologia que suporte codetexto estendido. +* Personalizar as dimensões do código de barras e salvar o arquivo PNG final. + +Nenhuma documentação externa é necessária; copie o código, execute-o e você terá uma imagem de código de barras que inclui caracteres chineses codificados com ECI 26 (UTF‑8). + +## Pré‑requisitos + +Antes de começar, certifique‑se de que você tem: + +* Python 3.8 ou superior instalado. +* Pacote `aspose-barcode` instalado (`pip install aspose-barcode`). +* Permissão de escrita na pasta onde pretende salvar o arquivo PNG. + +Se estiver usando um ambiente virtual, ative‑o primeiro para manter as dependências isoladas. + +## Etapa 1: Verificar a versão do Aspose.Barcode (opcional) + +Saber a versão exata da biblioteca ajuda quando você precisa relatar bugs ou comparar recursos entre versões. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Por que isso importa*: A saída da versão confirma que o runtime corresponde à documentação que você está seguindo. Versões diferentes podem suportar valores de ECI diferentes, portanto é uma verificação rápida de sanidade. + +## Etapa 2: Construir um codetexto estendido com partes simples e codificadas em ECI + +Aspose.Barcode fornece `ExtCodetextBuilder` para concatenar dados simples e segmentos codificados em ECI. Neste exemplo misturamos uma string numérica com caracteres chineses. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explicação*: +* `add_plain_codetext` insere dados que a simbologia do código de barras trata como caracteres ordinários. +* `add_eci_codetext` indica ao gerador que ele deve preceder o texto fornecido com um indicador ECI (aqui **26**, que corresponde ao UTF‑8). Isso é exatamente **como adicionar eci** a um código de barras. + +Você pode chamar `add_eci_codetext` várias vezes para incorporar vários blocos de idiomas diferentes. O builder lida automaticamente com as sequências de escape necessárias. + +## Etapa 3: Escolher uma simbologia que suporte codetexto estendido + +Nem todo tipo de código de barras pode armazenar segmentos ECI. Code 128, QR e Data Matrix são escolhas comuns. O exemplo usa Code 128 porque é amplamente suportado e funciona bem para dados alfanuméricos mistos. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Por que Code 128?*: Ele aceita toda a faixa ASCII e as sequências de escape ECI produzidas pelo builder, tornando‑o ideal para o cenário “como gerar código de barras” que mistura texto simples e codificado. + +## Etapa 4: Ajustar a aparência do código de barras + +Você pode controlar tamanho, altura, margens e muitos outros aspectos visuais via o objeto `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Dica*: Se planeja imprimir o código de barras, aumente `x_dimension` e `bar_height` proporcionalmente para manter a legibilidade no DPI alvo. + +## Etapa 5: Salvar a imagem do código de barras + +Por fim, grave a imagem gerada em um arquivo. Aspose.Barcode suporta PNG, JPEG, BMP e muitos outros formatos. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Certifique‑se de que a pasta `output` exista ou crie‑a com `os.makedirs("output", exist_ok=True)` antes de chamar `save`. + +### Resultado esperado + +Ao abrir `extended_codetext.png`, você deverá ver um código de barras Code 128 que codifica a string numérica `1234567890` seguida dos caracteres chineses “特殊字符”. Escaneando o código de barras com um leitor moderno que respeite ECI, o texto misto original será retornado. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode generated with how to generate barcode example"} + +## Perguntas comuns e casos de borda + +### E se eu precisar de um conjunto de caracteres diferente? + +Escolha o valor ECI apropriado na tabela ISO/IEC 18004. Por exemplo, ECI 27 representa ISO‑8859‑1 (Latin‑1). Substitua o identificador numérico em `add_eci_codetext` de acordo. + +### Posso incorporar mais de um bloco ECI? + +Sim. Chame `add_eci_codetext` várias vezes. O builder insere os códigos de troca ECI necessários entre os blocos, preservando a ordem em que você os adiciona. + +### O gerador suporta códigos QR com ECI? + +Absolutamente. Substitua `barcode.Symbology.CODE_128` por `barcode.Symbology.QR` e ajuste quaisquer parâmetros específicos de QR (por exemplo, nível de correção de erro) via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Como lidar com strings de dados muito longas? + +Para códigos de barras lineares como Code 128, o comprimento máximo é cerca de 80 caracteres ao usar codetexto estendido. Se você ultrapassar esse limite, considere mudar para uma simbologia bidimensional como QR ou Data Matrix, que pode armazenar milhares de caracteres. + +## Script completo e executável + +Abaixo está o programa completo que você pode copiar‑colar em um arquivo chamado `generate_extended_barcode.py` e executar diretamente. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## O que você deve aprender a seguir? + +Os tutoriais a seguir abordam tópicos intimamente relacionados que ampliam as técnicas demonstradas neste guia. Cada recurso inclui exemplos de código completos e funcionais com explicações passo a passo para ajudá‑lo a dominar recursos adicionais da API e explorar abordagens alternativas de implementação em seus próprios projetos. + +- [Como gerar imagem de código de barras com personalização de espaço suplementar usando Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Como gerar imagem de código de barras em Java com Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Como gerar código de barras DataMatrix com Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/russian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/russian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..75477709d --- /dev/null +++ b/barcode/russian/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,254 @@ +--- +category: general +date: 2026-08-19 +description: Как создать штрих‑код с ECI с помощью Aspose.Barcode для Python. Узнайте, + как добавить данные ECI, смешать обычный текст и сохранить изображение в одном понятном + руководстве. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: ru +lastmod: 2026-08-19 +og_description: Как создать штрих‑код с ECI с помощью Aspose.Barcode для Python. Следуйте + этому руководству, чтобы узнать, как добавить данные ECI, настроить внешний вид + и сохранить результат. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Как создать штрих‑код с ECI с помощью Aspose.Barcode Python — пошагово +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Как сгенерировать штрих‑код с ECI, используя Aspose.Barcode Python +url: /ru/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Как генерировать штрих‑код с ECI с помощью Aspose.Barcode Python + +Если вам нужно узнать **как генерировать штрих‑код**, содержащий как обычные символы, так и данные, закодированные с помощью ECI, это руководство покажет полный процесс. Вы увидите точно **как добавить eci** секции, настроить размер и записать изображение на диск с помощью одного исполняемого скрипта. + +В руководстве рассматривается: + +* Получение версии библиотеки Aspose.Barcode (необязательно, но полезно для отладки). +* Формирование строки расширенного codetext, смешивающей обычные и ECI‑закодированные символы. +* Создание генератора штрих‑кода для символьной системы, поддерживающей расширенный codetext. +* Настройка размеров штрих‑кода и сохранение конечного PNG‑файла. + +Никакой внешней документации не требуется; скопируйте код, запустите его, и вы получите изображение штрих‑кода, включающего китайские символы, закодированные с помощью ECI 26 (UTF‑8). + +## Требования + +Прежде чем начать, убедитесь, что у вас есть: + +* Установлен Python 3.8 или новее. +* Пакет `aspose-barcode` установлен (`pip install aspose-barcode`). +* Права на запись в папку, куда вы планируете сохранять PNG‑файл. + +Если вы используете виртуальное окружение, сначала активируйте его, чтобы изолировать зависимости. + +## Шаг 1: Проверка версии Aspose.Barcode (необязательно) + +Знание точной версии библиотеки помогает, когда нужно сообщать об ошибках или сравнивать возможности разных релизов. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Почему это важно*: Вывод версии подтверждает, что среда выполнения соответствует документации, которой вы следуете. Разные версии могут поддерживать разные значения ECI, поэтому это быстрая проверка корректности. + +## Шаг 2: Создание расширенного codetext с обычными и ECI‑закодированными частями + +Aspose.Barcode предоставляет `ExtCodetextBuilder` для конкатенации обычных данных и ECI‑закодированных сегментов. В этом примере мы смешиваем числовую строку с китайскими символами. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Пояснение*: +* `add_plain_codetext` вставляет данные, которые символьная система штрих‑кода воспринимает как обычные символы. +* `add_eci_codetext` указывает генератору добавить индикатор ECI (здесь **26**, соответствующий UTF‑8) перед переданным текстом. Это именно **как добавить eci** данные в штрих‑код. + +Вы можете вызывать `add_eci_codetext` несколько раз, чтобы встроить несколько блоков разных языков. Builder автоматически обрабатывает необходимые управляющие последовательности. + +## Шаг 3: Выбор символьной системы, поддерживающей расширенный codetext + +Не каждый тип штрих‑кода может хранить сегменты ECI. Code 128, QR и Data Matrix — распространённые варианты. В примере используется Code 128, потому что он широко поддерживается и хорошо работает с смешанными буквенно‑цифровыми данными. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Почему Code 128?*: Он принимает весь диапазон ASCII и управляющие последовательности ECI, генерируемые builder‑ом, что делает его идеальным для сценария «как генерировать штрих‑код», где смешаны обычный и закодированный текст. + +## Шаг 4: Настройка внешнего вида штрих‑кода + +Вы можете управлять размером, высотой, отступами и многими другими визуальными параметрами через объект `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Совет*: Если планируете печатать штрих‑код, увеличьте `x_dimension` и `bar_height` пропорционально, чтобы сохранить читаемость при целевом DPI. + +## Шаг 5: Сохранение изображения штрих‑кода + +Наконец, запишите сгенерированное изображение в файл. Aspose.Barcode поддерживает PNG, JPEG, BMP и многие другие форматы. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Убедитесь, что папка `output` существует, или создайте её с помощью `os.makedirs("output", exist_ok=True)` перед вызовом `save`. + +### Ожидаемый результат + +При открытии `extended_codetext.png` вы должны увидеть штрих‑код Code 128, который кодирует числовую строку `1234567890`, за которой следуют китайские символы «特殊字符». Сканирование штрих‑кода современным сканером, поддерживающим ECI, вернёт исходную смешанную строку. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Штрих‑код, сгенерированный примером как генерировать штрих‑код"} + +## Часто задаваемые вопросы и особые случаи + +### Что если мне нужен другой набор символов? + +Выберите соответствующее значение ECI из таблицы ISO/IEC 18004. Например, ECI 27 представляет ISO‑8859‑1 (Latin‑1). Замените числовой идентификатор в `add_eci_codetext` соответственно. + +### Можно ли встроить более одного блока ECI? + +Да. Вызывайте `add_eci_codetext` несколько раз. Builder вставит необходимые коды переключения ECI между блоками, сохраняя порядок их добавления. + +### Поддерживает ли генератор QR‑коды с ECI? + +Абсолютно. Замените `barcode.Symbology.CODE_128` на `barcode.Symbology.QR` и настройте любые QR‑специфические параметры (например, уровень коррекции ошибок) через `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +## Полный, исполняемый скрипт + +Ниже приведена полная программа, которую вы можете скопировать‑вставить в файл с именем `generate_extended_barcode.py` и запустить напрямую. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Что изучать дальше? + +Следующие руководства охватывают тесно связанные темы, которые развивают техники, продемонстрированные в этом руководстве. Каждый ресурс включает полностью работающие примеры кода с пошаговыми объяснениями, чтобы помочь вам освоить дополнительные возможности API и исследовать альтернативные подходы к реализации в собственных проектах. + +- [Как генерировать изображение штрих‑кода с настройкой дополнительного пространства с помощью Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Как генерировать изображение штрих‑кода в Java с Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Как генерировать DataMatrix штрих‑код с Aspose.BarCode для .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/spanish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/spanish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..04e846309 --- /dev/null +++ b/barcode/spanish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Cómo generar códigos de barras con ECI usando Aspose.Barcode para Python. + Aprende a añadir datos ECI, mezclar texto plano y guardar la imagen en una guía + clara. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: es +lastmod: 2026-08-19 +og_description: Cómo generar códigos de barras con ECI usando Aspose.Barcode para + Python. Sigue este tutorial para aprender a agregar datos ECI, personalizar la apariencia + y guardar el resultado. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Cómo generar códigos de barras con ECI usando Aspose.Barcode Python – paso + a paso +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Cómo generar códigos de barras con ECI usando Aspose.Barcode Python +url: /es/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cómo generar un código de barras con ECI usando Aspose.Barcode Python + +Si necesitas saber **cómo generar un código de barras** que contenga tanto caracteres simples como datos codificados con ECI, esta guía muestra el proceso completo. Verás exactamente **cómo añadir eci** a las secciones, ajustar el tamaño y escribir la imagen en disco con un único script ejecutable. + +El tutorial cubre: + +* Recuperar la versión de la biblioteca Aspose.Barcode (opcional pero útil para depuración). +* Construir una cadena de texto extendida que mezcle caracteres simples y codificados con ECI. +* Crear un generador de códigos de barras para una simbología que admita texto extendido. +* Personalizar las dimensiones del código de barras y guardar el archivo PNG final. + +No se requiere documentación externa; copia el código, ejecútalo y tendrás una imagen de código de barras que incluye caracteres chinos codificados con ECI 26 (UTF‑8). + +## Requisitos previos + +Antes de comenzar, asegúrate de tener: + +* Python 3.8 o superior instalado. +* Paquete `aspose-barcode` instalado (`pip install aspose-barcode`). +* Permiso de escritura en la carpeta donde planeas guardar el archivo PNG. + +Si utilizas un entorno virtual, actívalo primero para mantener las dependencias aisladas. + +## Paso 1: Verificar la versión de Aspose.Barcode (opcional) + +Conocer la versión exacta de la biblioteca ayuda cuando necesitas informar errores o comparar funcionalidades entre versiones. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Por qué es importante*: La salida de la versión confirma que el entorno de ejecución coincide con la documentación que estás siguiendo. Diferentes versiones pueden admitir distintos valores de ECI, por lo que es una verificación rápida de sanidad. + +## Paso 2: Construir un texto extendido con partes simples y codificadas con ECI + +Aspose.Barcode proporciona `ExtCodetextBuilder` para concatenar datos simples y segmentos codificados con ECI. En este ejemplo mezclamos una cadena numérica con caracteres chinos. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Explicación*: +* `add_plain_codetext` inserta datos que la simbología del código de barras trata como caracteres ordinarios. +* `add_eci_codetext` indica al generador que anteponga un indicador ECI (aquí **26**, que corresponde a UTF‑8) antes del texto suministrado. Esto es exactamente **cómo añadir eci** a un código de barras. + +Puedes llamar a `add_eci_codetext` varias veces para incrustar varios bloques de idioma diferentes. El constructor maneja automáticamente las secuencias de escape requeridas. + +## Paso 3: Elegir una simbología que admita texto extendido + +No todos los tipos de código de barras pueden almacenar segmentos ECI. Code 128, QR y Data Matrix son opciones comunes. El ejemplo usa Code 128 porque es ampliamente compatible y funciona bien con datos alfanuméricos mixtos. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*¿Por qué Code 128?*: Acepta todo el rango ASCII y las secuencias de escape ECI generadas por el constructor, lo que lo hace ideal para el escenario de **cómo generar un código de barras** que mezcla texto simple y codificado. + +## Paso 4: Ajustar la apariencia del código de barras + +Puedes controlar el tamaño, la altura, los márgenes y muchos otros aspectos visuales mediante el objeto `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Consejo*: Si planeas imprimir el código de barras, incrementa `x_dimension` y `bar_height` proporcionalmente para mantener la legibilidad al DPI objetivo. + +## Paso 5: Guardar la imagen del código de barras + +Finalmente, escribe la imagen generada en un archivo. Aspose.Barcode admite PNG, JPEG, BMP y muchos otros formatos. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Asegúrate de que la carpeta `output` exista o créala con `os.makedirs("output", exist_ok=True)` antes de llamar a `save`. + +### Resultado esperado + +Al abrir `extended_codetext.png`, deberías ver un código de barras Code 128 que codifica la cadena numérica `1234567890` seguida de los caracteres chinos “特殊字符”. Escanear el código con un lector moderno que respete ECI devolverá la cadena mixta original. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Código de barras generado con ejemplo de cómo generar código de barras"} + +## Preguntas frecuentes y casos límite + +### ¿Qué pasa si necesito un conjunto de caracteres diferente? + +Elige el valor ECI apropiado de la tabla ISO/IEC 18004. Por ejemplo, ECI 27 representa ISO‑8859‑1 (Latin‑1). Sustituye el identificador numérico en `add_eci_codetext` según corresponda. + +### ¿Puedo incrustar más de un bloque ECI? + +Sí. Llama a `add_eci_codetext` varias veces. El constructor inserta los códigos de cambio ECI necesarios entre los bloques, preservando el orden en que los añades. + +### ¿El generador admite códigos QR con ECI? + +Absolutamente. Sustituye `barcode.Symbology.CODE_128` por `barcode.Symbology.QR` y ajusta los parámetros específicos de QR (por ejemplo, nivel de corrección de errores) mediante `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### ¿Cómo manejar cadenas de datos muy largas? + +Para códigos de barras lineales como Code 128, la longitud máxima es de aproximadamente 80 caracteres cuando se usa texto extendido. Si superas ese límite, considera cambiar a una simbología bidimensional como QR o Data Matrix, que pueden almacenar miles de caracteres. + +## Script completo y ejecutable + +A continuación tienes el programa completo que puedes copiar y pegar en un archivo llamado `generate_extended_barcode.py` y ejecutar directamente. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## ¿Qué deberías aprender a continuación? + +Los siguientes tutoriales cubren temas estrechamente relacionados que amplían las técnicas demostradas en esta guía. Cada recurso incluye ejemplos de código completos y explicaciones paso a paso para ayudarte a dominar funciones adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [Cómo generar una imagen de código de barras con personalización de espacio suplementario usando Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Cómo generar una imagen de código de barras en Java con Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Cómo generar un código de barras DataMatrix con Aspose.BarCode para .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/swedish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/swedish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..a299d6f4e --- /dev/null +++ b/barcode/swedish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,260 @@ +--- +category: general +date: 2026-08-19 +description: Hur man genererar streckkod med ECI med Aspose.Barcode för Python. Lär + dig hur du lägger till eci‑data, blandar vanlig text och sparar bilden i en tydlig + guide. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: sv +lastmod: 2026-08-19 +og_description: Hur man genererar streckkod med ECI med Aspose.Barcode för Python. + Följ den här handledningen för att lära dig hur du lägger till eci‑data, anpassar + utseendet och sparar resultatet. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Hur du genererar en streckkod med ECI med Aspose.Barcode Python – steg för + steg +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Hur man genererar streckkod med ECI med Aspose.Barcode Python +url: /sv/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Så genererar du streckkod med ECI med Aspose.Barcode Python + +Om du behöver veta **hur man genererar streckkod** som innehåller både vanliga tecken och ECI‑kodad data, visar den här guiden hela processen. Du får se exakt **hur man lägger till eci**‑sektioner, justerar storlek och skriver bilden till disk med ett enda, körbart skript. + +Tutorialen täcker: + +* Hämta versionen av Aspose.Barcode‑biblioteket (valfritt men användbart för felsökning). +* Bygga en utökad codetext‑sträng som blandar vanliga och ECI‑kodade tecken. +* Skapa en streckkodsgenerator för en symbolik som stödjer utökad codetext. +* Anpassa streckkodens dimensioner och spara den slutliga PNG‑filen. + +Ingen extern dokumentation krävs; kopiera koden, kör den, så får du en streckkodsbild som inkluderar kinesiska tecken kodade med ECI 26 (UTF‑8). + +## Förutsättningar + +Innan du börjar, se till att du har: + +* Python 3.8 eller nyare installerat. +* `aspose-barcode`‑paketet installerat (`pip install aspose-barcode`). +* Skrivbehörighet till den mapp där du avser att spara PNG‑filen. + +Om du använder en virtuell miljö, aktivera den först för att hålla beroenden isolerade. + +## Steg 1: Verifiera Aspose.Barcode‑versionen (valfritt) + +Att känna till den exakta biblioteksversionen hjälper när du behöver rapportera buggar eller jämföra funktioner mellan releaser. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Varför detta är viktigt*: Versionsutskriften bekräftar att runtime‑miljön matchar den dokumentation du följer. Olika versioner kan stödja olika ECI‑värden, så det är en snabb kontroll. + +## Steg 2: Bygg en utökad codetext med vanliga och ECI‑kodade delar + +Aspose.Barcode tillhandahåller `ExtCodetextBuilder` för att sammanfoga vanlig data och ECI‑kodade segment. I detta exempel blandar vi en numerisk sträng med kinesiska tecken. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Förklaring*: +* `add_plain_codetext` infogar data som streckkodssymboliken behandlar som vanliga tecken. +* `add_eci_codetext` instruerar generatorn att lägga till en ECI‑indikator (här **26**, som motsvarar UTF‑8) före den angivna texten. Detta är exakt **hur man lägger till eci**‑data i en streckkod. + +Du kan anropa `add_eci_codetext` flera gånger för att bädda in flera olika språkblock. Buildern hanterar de nödvändiga escape‑sekvenserna automatiskt. + +## Steg 3: Välj en symbolik som stödjer utökad codetext + +Inte alla streckkodstyper kan lagra ECI‑segment. Code 128, QR och Data Matrix är vanliga val. Exemplet använder Code 128 eftersom det är brett stödjat och fungerar bra för blandad alfanumerisk data. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Varför Code 128?*: Det accepterar hela ASCII‑intervallet och de ECI‑escape‑sekvenser som buildern producerar, vilket gör det idealiskt för scenariot “hur man genererar streckkod” som blandar vanlig och kodad text. + +## Steg 4: Justera streckkodens utseende + +Du kan kontrollera storlek, höjd, marginaler och många andra visuella aspekter via `parameters`‑objektet. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Tips*: Om du planerar att skriva ut streckkoden, öka `x_dimension` och `bar_height` proportionellt för att behålla läsbarheten vid mål‑DPI. + +## Steg 5: Spara streckkodbilden + +Till sist skriver du den genererade bilden till en fil. Aspose.Barcode stödjer PNG, JPEG, BMP och många andra format. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Se till att `output`‑mappen finns eller skapa den med `os.makedirs("output", exist_ok=True)` innan du anropar `save`. + +### Förväntat resultat + +När du öppnar `extended_codetext.png` bör du se en Code 128‑streckkod som kodar den numeriska strängen `1234567890` följt av de kinesiska tecknen “特殊字符”. Skannar du streckkoden med en modern scanner som respekterar ECI, returneras den ursprungliga blandade strängen. + +![Streckkod genererad med exempel för hur man genererar streckkod](https://example.com/images/barcode-sample.png){: .align-center alt="Streckkod genererad med exempel för hur man genererar streckkod"} + +## Vanliga frågor och kantfall + +### Vad gör jag om jag behöver ett annat teckensätt? + +Välj rätt ECI‑värde från ISO/IEC 18004‑tabellen. Till exempel representerar ECI 27 ISO‑8859‑1 (Latin‑1). Ersätt det numeriska identifieraren i `add_eci_codetext` därefter. + +### Kan jag bädda in mer än ett ECI‑block? + +Ja. Anropa `add_eci_codetext` flera gånger. Buildern sätter in de nödvändiga ECI‑växlingskoderna mellan blocken och bevarar den ordning du lägger till dem. + +### Stöder generatorn QR‑koder med ECI? + +Absolut. Byt ut `barcode.Symbology.CODE_128` mot `barcode.Symbology.QR` och justera eventuella QR‑specifika parametrar (t.ex. felkorrigeringsnivå) via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Hur hanterar man mycket långa datasträngar? + +För linjära streckkoder som Code 128 är maximal längd cirka 80 tecken när man använder utökad codetext. Överskrider du detta, överväg att byta till en tvådimensionell symbolik såsom QR eller Data Matrix, som kan lagra tusentals tecken. + +## Fullt körbart skript + +Nedan är hela programmet som du kan kopiera‑klistra in i en fil med namnet `generate_extended_barcode.py` och köra direkt. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Vad bör du lära dig härnäst? + + +Följande handledningar täcker närbesläktade ämnen som bygger vidare på teknikerna som demonstreras i den här guiden. Varje resurs innehåller kompletta fungerande kodexempel med steg‑för‑steg‑förklaringar för att hjälpa dig bemästra ytterligare API‑funktioner och utforska alternativa implementationsmetoder i dina egna projekt. + +- [Hur man genererar streckkodsbild med anpassning av tilläggsutrymme med Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Hur man genererar streckkodsbild i Java med Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Hur man genererar DataMatrix‑streckkod med Aspose.BarCode för .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/thai/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/thai/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..6e7d370e2 --- /dev/null +++ b/barcode/thai/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,257 @@ +--- +category: general +date: 2026-08-19 +description: วิธีสร้างบาร์โค้ดด้วย ECI โดยใช้ Aspose.Barcode สำหรับ Python เรียนรู้วิธีเพิ่มข้อมูล + ECI ผสมข้อความธรรมดา และบันทึกภาพในคู่มือที่ชัดเจนหนึ่งเดียว. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: th +lastmod: 2026-08-19 +og_description: วิธีสร้างบาร์โค้ดด้วย ECI โดยใช้ Aspose.Barcode สำหรับ Python. ตามบทแนะนำนี้เพื่อเรียนรู้วิธีเพิ่มข้อมูล + ECI, ปรับแต่งลักษณะ, และบันทึกผลลัพธ์. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: วิธีสร้างบาร์โค้ดด้วย ECI โดยใช้ Aspose.Barcode Python – ทีละขั้นตอน +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: วิธีสร้างบาร์โค้ดด้วย ECI โดยใช้ Aspose.Barcode Python +url: /th/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# วิธีสร้างบาร์โค้ดด้วย ECI โดยใช้ Aspose.Barcode Python + +หากคุณต้องการทราบ **วิธีสร้างบาร์โค้ด** ที่มีทั้งอักขระธรรมดาและข้อมูลที่เข้ารหัสด้วย ECI คำแนะนำนี้จะแสดงกระบวนการทั้งหมด คุณจะได้เห็น **วิธีเพิ่มส่วน eci** ปรับขนาด และบันทึกภาพลงดิสก์ด้วยสคริปต์ที่ทำงานได้ในครั้งเดียว + +บทเรียนนี้ครอบคลุม: + +* การดึงเวอร์ชันของไลบรารี Aspose.Barcode (ไม่บังคับแต่มีประโยชน์สำหรับการดีบัก) +* การสร้างสตริง codetext ที่ขยายได้ซึ่งผสมอักขระธรรมดาและอักขระที่เข้ารหัสด้วย ECI +* การสร้างตัวสร้างบาร์โค้ดสำหรับ symbology ที่รองรับ codetext ที่ขยายได้ +* การปรับขนาดบาร์โค้ดและบันทึกไฟล์ PNG สุดท้าย + +ไม่จำเป็นต้องอ้างอิงเอกสารภายนอก; คัดลอกโค้ด, รันมัน, แล้วคุณจะได้ภาพบาร์โค้ดที่รวมอักขระจีนที่เข้ารหัสด้วย ECI 26 (UTF‑8) + +## ข้อกำหนดเบื้องต้น + +ก่อนเริ่มทำตามขั้นตอนต่อไปนี้ให้แน่ใจว่าคุณมี: + +* Python 3.8 หรือใหม่กว่า +* แพ็กเกจ `aspose-barcode` ติดตั้งแล้ว (`pip install aspose-barcode`) +* สิทธิ์การเขียนในโฟลเดอร์ที่คุณตั้งใจจะบันทึกไฟล์ PNG + +หากคุณใช้ virtual environment ให้เปิดใช้งานก่อนเพื่อแยกการพึ่งพาออกจากระบบหลัก + +## ขั้นตอนที่ 1: ตรวจสอบเวอร์ชันของ Aspose.Barcode (ไม่บังคับ) + +การรู้เวอร์ชันที่แน่นอนของไลบรารีช่วยเมื่อคุณต้องรายงานบั๊กหรือเปรียบเทียบฟีเจอร์ระหว่างรุ่นต่าง ๆ + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*ทำไมจึงสำคัญ*: ผลลัพธ์ของเวอร์ชันยืนยันว่ารันไทม์ตรงกับเอกสารที่คุณกำลังทำตาม รุ่นที่ต่างกันอาจรองรับค่า ECI ที่แตกต่างกัน ดังนั้นนี่เป็นการตรวจสอบอย่างรวดเร็ว + +## ขั้นตอนที่ 2: สร้าง extended codetext ด้วยส่วนธรรมดาและส่วนที่เข้ารหัสด้วย ECI + +Aspose.Barcode มี `ExtCodetextBuilder` เพื่อเชื่อมต่อข้อมูลธรรมดาและส่วนที่เข้ารหัสด้วย ECI ในตัวอย่างนี้เราจะผสมสตริงตัวเลขกับอักขระจีน + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*คำอธิบาย*: +* `add_plain_codetext` แทรกข้อมูลที่ symbology ของบาร์โค้ดถือเป็นอักขระธรรมดา +* `add_eci_codetext` บอกตัวสร้างให้ใส่ตัวบ่งชี้ ECI (ที่นี่ **26** ซึ่งแมปกับ UTF‑8) ก่อนข้อความที่ให้มา นี่คือ **วิธีเพิ่ม eci** ลงในบาร์โค้ด + +คุณสามารถเรียก `add_eci_codetext` หลายครั้งเพื่อฝังบล็อกภาษาต่าง ๆ ได้ ตัวสร้างจะจัดการลำดับ escape sequence ที่จำเป็นโดยอัตโนมัติ + +## ขั้นตอนที่ 3: เลือก symbology ที่รองรับ extended codetext + +ไม่ใช่ทุกประเภทของบาร์โค้ดจะเก็บส่วน ECI ได้ Code 128, QR, และ Data Matrix เป็นตัวเลือกที่พบบ่อย ตัวอย่างใช้ Code 128 เพราะรองรับอย่างกว้างขวางและทำงานได้ดีกับข้อมูลอัลฟานูเมอริกผสม + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*ทำไมต้อง Code 128?*: รองรับช่วง ASCII ทั้งหมดและลำดับ escape ของ ECI ที่สร้างโดย builder ทำให้เหมาะกับสถานการณ์ “วิธีสร้างบาร์โค้ด” ที่ผสมข้อความธรรมดาและข้อความที่เข้ารหัส + +## ขั้นตอนที่ 4: ปรับลักษณะของบาร์โค้ด + +คุณสามารถควบคุมขนาด, ความสูง, ระยะขอบ, และลักษณะภาพอื่น ๆ ผ่านอ็อบเจ็กต์ `parameters` + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*เคล็ดลับ*: หากคุณวางแผนพิมพ์บาร์โค้ด ให้เพิ่มค่า `x_dimension` และ `bar_height` อย่างสัดส่วนเพื่อรักษาความอ่านได้ที่ DPI เป้าหมาย + +## ขั้นตอนที่ 5: บันทึกภาพบาร์โค้ด + +สุดท้ายให้เขียนภาพที่สร้างขึ้นลงไฟล์ Aspose.Barcode รองรับ PNG, JPEG, BMP และรูปแบบอื่น ๆ อีกหลายชนิด + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +ตรวจสอบให้แน่ใจว่าโฟลเดอร์ `output` มีอยู่หรือสร้างด้วย `os.makedirs("output", exist_ok=True)` ก่อนเรียก `save` + +### ผลลัพธ์ที่คาดหวัง + +เมื่อคุณเปิดไฟล์ `extended_codetext.png` คุณควรเห็นบาร์โค้ด Code 128 ที่เข้ารหัสสตริงตัวเลข `1234567890` ตามด้วยอักขระจีน “特殊字符” การสแกนบาร์โค้ดด้วยสแกนเนอร์สมัยใหม่ที่รองรับ ECI จะคืนค่าข้อความผสมเดิม + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="บาร์โค้ดที่สร้างด้วยตัวอย่างวิธีสร้างบาร์โค้ด"} + +## คำถามทั่วไปและกรณีขอบ + +### ถ้าต้องการชุดอักขระอื่น? + +เลือกค่า ECI ที่เหมาะสมจากตาราง ISO/IEC 18004 ตัวอย่างเช่น ECI 27 แทนค่า ISO‑8859‑1 (Latin‑1) แทนที่ตัวระบุตัวเลขใน `add_eci_codetext` ตามนั้น + +### สามารถฝังบล็อก ECI มากกว่าหนึ่งบล็อกได้หรือไม่? + +ได้ เรียก `add_eci_codetext` หลายครั้ง Builder จะใส่โค้ดสลับ ECI ที่จำเป็นระหว่างบล็อกโดยคงลำดับที่คุณเพิ่มไว้ + +### ตัวสร้างรองรับ QR code ที่มี ECI หรือไม่? + +แน่นอน แทนที่ `barcode.Symbology.CODE_128` ด้วย `barcode.Symbology.QR` และปรับพารามิเตอร์เฉพาะ QR (เช่นระดับการแก้ไขข้อผิดพลาด) ผ่าน `generator.parameters.qr` + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### จะจัดการกับสตริงข้อมูลยาวมากอย่างไร? + +สำหรับบาร์โค้ดเชิงเส้นเช่น Code 128 ความยาวสูงสุดประมาณ 80 อักขระเมื่อใช้ extended codetext หากเกินนี้ให้พิจารณาเปลี่ยนไปใช้ symbology แบบสองมิติ เช่น QR หรือ Data Matrix ซึ่งสามารถเก็บข้อมูลได้หลายพันอักขระ + +## สคริปต์เต็มที่สามารถรันได้ + +ด้านล่างเป็นโปรแกรมสมบัติที่คุณสามารถคัดลอก‑วางลงในไฟล์ชื่อ `generate_extended_barcode.py` แล้วรันได้โดยตรง + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## สิ่งที่คุณควรเรียนต่อไป + + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคที่แสดงในคู่มือนี้ แต่ละแหล่งรวมตัวอย่างโค้ดที่ทำงานได้เต็มรูปแบบพร้อมคำอธิบายทีละขั้นตอน เพื่อช่วยคุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจวิธีการดำเนินการแบบต่าง ๆ ในโปรเจกต์ของคุณเอง + +- [How to Generate Barcode Image with Supplemental Space Customization using Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [How to Generate Barcode Image in Java with Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [How to generate DataMatrix barcode with Aspose.BarCode for .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/turkish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/turkish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..aecbb7171 --- /dev/null +++ b/barcode/turkish/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,259 @@ +--- +category: general +date: 2026-08-19 +description: Aspose.Barcode for Python kullanarak ECI ile barkod nasıl oluşturulur. + ECI verisini eklemeyi, düz metni karıştırmayı ve resmi kaydetmeyi tek bir net rehberde + öğrenin. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: tr +lastmod: 2026-08-19 +og_description: Aspose.Barcode for Python kullanarak ECI ile barkod nasıl oluşturulur. + Bu öğreticiyi izleyerek eci verisi eklemeyi, görünümü özelleştirmeyi ve sonucu kaydetmeyi + öğrenin. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Aspose.Barcode Python ile ECI kullanarak barkod nasıl oluşturulur – adım + adım +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Aspose.Barcode Python kullanarak ECI ile barkod nasıl oluşturulur +url: /tr/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# ECI kullanarak Aspose.Barcode Python ile barkod oluşturma + +Düz metin karakterleri ve ECI‑kodlu verileri içeren **barkod nasıl oluşturulur** bilmeniz gerekiyorsa, bu kılavuz tam süreci gösterir. **eci nasıl eklenir** bölümlerini, boyutu ayarlamayı ve tek bir çalıştırılabilir betikle görüntüyü diske kaydetmeyi göreceksiniz. + +The tutorial covers: + +* Aspose.Barcode kütüphane sürümünü alma (isteğe bağlı ancak hata ayıklama için faydalı). +* Düz ve ECI‑kodlu karakterleri karıştıran genişletilmiş kod metni dizesi oluşturma. +* Genişletilmiş kod metnini destekleyen bir semboloji için barkod oluşturucu oluşturma. +* Barkod boyutlarını özelleştirme ve son PNG dosyasını kaydetme. + +Harici bir dokümantasyona gerek yok; kodu kopyalayın, çalıştırın ve ECI 26 (UTF‑8) ile kodlanmış Çince karakterleri içeren bir barkod görüntüsü elde edeceksiniz. + +## Önkoşullar + +Before you start, make sure you have: + +* Python 3.8 veya daha yeni bir sürüm yüklü. +* `aspose-barcode` paketi yüklü (`pip install aspose-barcode`). +* PNG dosyasını kaydetmek istediğiniz klasöre yazma izni. + +Bir sanal ortam kullanıyorsanız, bağımlılıkları izole tutmak için önce onu etkinleştirin. + +## Adım 1: Aspose.Barcode sürümünü doğrula (isteğe bağlı) + +Knowing the exact library version helps when you need to report bugs or compare features across releases. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Neden önemli*: Sürüm çıktısı, çalıştırma ortamının takip ettiğiniz dokümantasyonla eşleştiğini doğrular. Farklı sürümler farklı ECI değerlerini destekleyebilir, bu yüzden hızlı bir kontrol sağlar. + +## Adım 2: Düz ve ECI‑kodlu bölümlerle genişletilmiş kod metni oluşturma + +Aspose.Barcode, düz veri ve ECI‑kodlu segmentleri birleştirmek için `ExtCodetextBuilder` sağlar. Bu örnekte sayısal bir dizeyi Çince karakterlerle karıştırıyoruz. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Açıklama*: +* `add_plain_codetext` barkod sembolojisinin normal karakterler olarak yorumladığı veriyi ekler. +* `add_eci_codetext` jeneratöre, sağlanan metinden önce bir ECI göstergesi (burada **26**, UTF‑8’e karşılık gelir) eklemesini söyler. Bu, bir barkoda **eci nasıl eklenir** verisinin tam olarak eklenmesidir. + +`add_eci_codetext` metodunu birden fazla kez çağırarak çeşitli dil bloklarını gömebilirsiniz. Builder gerekli kaçış dizilerini otomatik olarak yönetir. + +## Adım 3: Genişletilmiş kod metnini destekleyen bir semboloji seçin + +Not every barcode type can store ECI segments. Code 128, QR, and Data Matrix are common choices. The example uses Code 128 because it is widely supported and works well for mixed alphanumeric data. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Neden Code 128?*: Builder tarafından üretilen tam ASCII aralığını ve ECI kaçış dizilerini kabul eder, bu da düz ve kodlanmış metni karıştıran “barkod nasıl oluşturulur” senaryosu için idealdir. + +## Adım 4: Barkod görünümünü ayarla + +You can control size, height, margins, and many other visual aspects via the `parameters` object. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*İpucu*: Barkodu yazdırmayı planlıyorsanız, hedef DPI’da okunabilirliği korumak için `x_dimension` ve `bar_height` değerlerini orantılı olarak artırın. + +## Adım 5: Barkod görüntüsünü kaydet + +Finally, write the generated image to a file. Aspose.Barcode supports PNG, JPEG, BMP, and many other formats. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +`save` metodunu çağırmadan önce `output` klasörünün var olduğundan emin olun veya `os.makedirs("output", exist_ok=True)` ile oluşturun. + +### Beklenen sonuç + +When you open `extended_codetext.png`, you should see a Code 128 barcode that encodes the numeric string `1234567890` followed by the Chinese characters “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return the original mixed string. + +![Barcode generated with how to generate barcode example](https://example.com/images/barcode-sample.png){: .align-center alt="Barcode oluşturma örneği ile oluşturulan barkod"} + +## Yaygın sorular ve uç durumlar + +### Farklı bir karakter setine ihtiyacım olsaydı ne olur? + +Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` accordingly. + +### Birden fazla ECI bloğu gömebilir miyim? + +Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary ECI switch codes between blocks, preserving the order you add them. + +### Jeneratör QR kodlarını ECI ile destekliyor mu? + +Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Çok uzun veri dizelerini nasıl yönetirim? + +For linear barcodes like Code 128, the maximum length is about 80 characters when using extended codetext. If you exceed that, consider switching to a two‑dimensional symbology such as QR or Data Matrix, which can store thousands of characters. + +## Tam, çalıştırılabilir betik + +Below is the complete program you can copy‑paste into a file named `generate_extended_barcode.py` and run directly. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Sonra Ne Öğrenmelisiniz? + +The following tutorials cover closely related topics that build on the techniques demonstrated in this guide. Each resource includes complete working code examples with step-by-step explanations to help you master additional API features and explore alternative implementation approaches in your own projects. + +- [Aspose.BarCode ile Ekstra Boşluk Özelleştirmesi Kullanarak Barkod Görüntüsü Oluşturma](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Aspose.BarCode ile Java’da Barkod Görüntüsü Oluşturma](/barcode/english/java/barcode-rendering-techniques/) +- [.NET için Aspose.BarCode ile DataMatrix barkodu oluşturma](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file diff --git a/barcode/vietnamese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md b/barcode/vietnamese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md new file mode 100644 index 000000000..950a70ac6 --- /dev/null +++ b/barcode/vietnamese/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/_index.md @@ -0,0 +1,257 @@ +--- +category: general +date: 2026-08-19 +description: Cách tạo mã vạch với ECI bằng Aspose.Barcode cho Python. Tìm hiểu cách + thêm dữ liệu ECI, kết hợp văn bản thường và lưu hình ảnh trong một hướng dẫn rõ + ràng. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- how to generate barcode +- how to add eci +- Aspose.Barcode Python +- extended codetext barcode +- ECI encoding Python +language: vi +lastmod: 2026-08-19 +og_description: Cách tạo mã vạch với ECI bằng Aspose.Barcode cho Python. Hãy theo + dõi hướng dẫn này để học cách thêm dữ liệu ECI, tùy chỉnh giao diện và lưu kết quả. +og_image_alt: Screenshot showing a barcode generated with how to generate barcode + example +og_title: Cách tạo mã vạch với ECI bằng Aspose.Barcode Python – từng bước +schemas: +- author: Aspose + dateModified: '2026-08-19' + description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + headline: How to generate barcode with ECI using Aspose.Barcode Python + type: TechArticle +- description: How to generate barcode with ECI using Aspose.Barcode for Python. Learn + how to add eci data, mix plain text, and save the image in one clear guide. + name: How to generate barcode with ECI using Aspose.Barcode Python + steps: + - name: Expected result + text: When you open `extended_codetext.png`, you should see a Code 128 barcode + that encodes the numeric string `1234567890` followed by the Chinese characters + “特殊字符”. Scanning the barcode with a modern scanner that respects ECI will return + the original mixed string. + - name: What if I need a different character set? + text: Choose the appropriate ECI value from the ISO/IEC 18004 table. For example, + ECI 27 represents ISO‑8859‑1 (Latin‑1). Replace the numeric identifier in `add_eci_codetext` + accordingly. + - name: Can I embed more than one ECI block? + text: Yes. Call `add_eci_codetext` multiple times. The builder inserts the necessary + ECI switch codes between blocks, preserving the order you add them. + - name: Does the generator support QR codes with ECI? + text: Absolutely. Replace `barcode.Symbology.CODE_128` with `barcode.Symbology.QR` + and adjust any QR‑specific parameters (e.g., error correction level) via `generator.parameters.qr`. + - name: How to handle very long data strings? + text: For linear barcodes like Code 128, the maximum length is about 80 characters + when using extended codetext. If you exceed that, consider switching to a two‑dimensional + symbology such as QR or Data Matrix, which can store thousands of characters. + type: HowTo +tags: +- barcode +- Python +- Aspose +title: Cách tạo mã vạch với ECI bằng Aspose.Barcode Python +url: /vi/python/general/how-to-generate-barcode-with-eci-using-aspose-barcode-python/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Cách tạo mã vạch với ECI bằng Aspose.Barcode Python + +Nếu bạn cần biết **cách tạo mã vạch** chứa cả ký tự thường và dữ liệu được mã hoá bằng ECI, hướng dẫn này sẽ trình bày toàn bộ quy trình. Bạn sẽ thấy chính xác **cách thêm eci** vào các phần, điều chỉnh kích thước và ghi hình ảnh ra đĩa với một script duy nhất có thể chạy. + +Hướng dẫn bao gồm: + +* Lấy phiên bản thư viện Aspose.Barcode (tùy chọn nhưng hữu ích cho việc gỡ lỗi). +* Xây dựng chuỗi codetext mở rộng kết hợp ký tự thường và ký tự được mã hoá bằng ECI. +* Tạo trình tạo mã vạch cho một symbology hỗ trợ codetext mở rộng. +* Tùy chỉnh kích thước mã vạch và lưu file PNG cuối cùng. + +Không cần tài liệu bên ngoài; sao chép mã, chạy nó, và bạn sẽ có một hình ảnh mã vạch bao gồm các ký tự Trung Quốc được mã hoá với ECI 26 (UTF‑8). + +## Yêu cầu trước + +Trước khi bắt đầu, hãy chắc chắn rằng bạn có: + +* Python 3.8 hoặc mới hơn đã được cài đặt. +* Gói `aspose-barcode` đã được cài đặt (`pip install aspose-barcode`). +* Quyền ghi vào thư mục nơi bạn dự định lưu file PNG. + +Nếu bạn đang sử dụng môi trường ảo, hãy kích hoạt nó trước để giữ các phụ thuộc được cô lập. + +## Bước 1: Xác minh phiên bản Aspose.Barcode (tùy chọn) + +Biết chính xác phiên bản thư viện giúp khi bạn cần báo cáo lỗi hoặc so sánh tính năng giữa các phiên bản. + +```python +import aspose.barcode as barcode +from aspose.barcode.generation import BuildVersionInfo + +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) +``` + +*Lý do quan trọng*: Đầu ra phiên bản xác nhận rằng môi trường chạy khớp với tài liệu bạn đang theo dõi. Các phiên bản khác nhau có thể hỗ trợ các giá trị ECI khác nhau, vì vậy đây là một kiểm tra nhanh. + +## Bước 2: Xây dựng codetext mở rộng với phần thường và phần được mã hoá bằng ECI + +Aspose.Barcode cung cấp `ExtCodetextBuilder` để nối dữ liệu thường và các đoạn được mã hoá bằng ECI. Trong ví dụ này chúng ta kết hợp một chuỗi số với các ký tự Trung Quốc. + +```python +from aspose.barcode.generation import ExtCodetextBuilder + +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using ECI 26 (UTF‑8) +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) +``` + +*Giải thích*: +* `add_plain_codetext` chèn dữ liệu mà symbology của mã vạch coi là ký tự thông thường. +* `add_eci_codetext` yêu cầu trình tạo thêm chỉ báo ECI (ở đây **26**, tương ứng với UTF‑8) trước văn bản được cung cấp. Đây chính là **cách thêm eci** vào dữ liệu mã vạch. + +Bạn có thể gọi `add_eci_codetext` nhiều lần để nhúng nhiều khối ngôn ngữ khác nhau. Builder sẽ tự động xử lý các chuỗi escape cần thiết. + +## Bước 3: Chọn một symbology hỗ trợ codetext mở rộng + +Không phải mọi loại mã vạch đều có thể lưu các đoạn ECI. Code 128, QR và Data Matrix là các lựa chọn phổ biến. Ví dụ sử dụng Code 128 vì nó được hỗ trợ rộng rãi và hoạt động tốt cho dữ liệu hỗn hợp alphanumeric. + +```python +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, # Code128 supports extended codetext + extended_codetext +) +``` + +*Tại sao lại là Code 128?*: Nó chấp nhận toàn bộ dải ASCII và các chuỗi escape ECI do builder tạo ra, làm cho nó trở thành lựa chọn lý tưởng cho kịch bản “cách tạo mã vạch” mà kết hợp văn bản thường và đã mã hoá. + +## Bước 4: Điều chỉnh giao diện mã vạch + +Bạn có thể kiểm soát kích thước, chiều cao, lề và nhiều khía cạnh hình ảnh khác qua đối tượng `parameters`. + +```python +# Width of a single module (the smallest bar) +generator.parameters.barcode.x_dimension = 2 # 2 pixels per module + +# Height of the bars (for linear barcodes) +generator.parameters.barcode.bar_height = 50 # 50 pixels tall + +# Optional: add quiet zone (margin) if required by a scanner +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 # 10 pixels margin on each side +``` + +*Mẹo*: Nếu bạn dự định in mã vạch, tăng `x_dimension` và `bar_height` một cách tỷ lệ để duy trì khả năng đọc ở DPI mục tiêu. + +## Bước 5: Lưu hình ảnh mã vạch + +Cuối cùng, ghi hình ảnh đã tạo ra vào một tệp. Aspose.Barcode hỗ trợ PNG, JPEG, BMP và nhiều định dạng khác. + +```python +output_path = "output/extended_codetext.png" +generator.save(output_path) +print(f"Barcode saved as {output_path}") +``` + +Đảm bảo thư mục `output` tồn tại hoặc tạo nó bằng `os.makedirs("output", exist_ok=True)` trước khi gọi `save`. + +### Kết quả mong đợi + +Khi bạn mở `extended_codetext.png`, bạn sẽ thấy một mã vạch Code 128 mã hoá chuỗi số `1234567890` tiếp theo là các ký tự Trung Quốc “特殊字符”. Quét mã vạch bằng một máy quét hiện đại hỗ trợ ECI sẽ trả về chuỗi hỗn hợp gốc. + +![Mã vạch được tạo với ví dụ cách tạo mã vạch](https://example.com/images/barcode-sample.png){: .align-center alt="Mã vạch được tạo với ví dụ cách tạo mã vạch"} + +## Câu hỏi thường gặp và các trường hợp đặc biệt + +### Nếu tôi cần một bộ ký tự khác thì sao? + +Chọn giá trị ECI phù hợp từ bảng ISO/IEC 18004. Ví dụ, ECI 27 đại diện cho ISO‑8859‑1 (Latin‑1). Thay thế định danh số trong `add_eci_codetext` cho phù hợp. + +### Tôi có thể nhúng hơn một khối ECI không? + +Có. Gọi `add_eci_codetext` nhiều lần. Builder sẽ chèn các mã chuyển đổi ECI cần thiết giữa các khối, giữ nguyên thứ tự bạn thêm chúng. + +### Trình tạo có hỗ trợ mã QR với ECI không? + +Chắc chắn. Thay thế `barcode.Symbology.CODE_128` bằng `barcode.Symbology.QR` và điều chỉnh bất kỳ tham số đặc thù QR nào (ví dụ, mức sửa lỗi) qua `generator.parameters.qr`. + +```python +generator.parameters.qr.error_correction_level = barcode.QRErrorLevel.H +``` + +### Làm sao xử lý các chuỗi dữ liệu rất dài? + +Đối với các mã vạch tuyến tính như Code 128, độ dài tối đa khoảng 80 ký tự khi sử dụng codetext mở rộng. Nếu vượt quá, hãy cân nhắc chuyển sang symbology hai chiều như QR hoặc Data Matrix, có thể lưu hàng ngàn ký tự. + +## Script đầy đủ, có thể chạy + +Dưới đây là chương trình hoàn chỉnh bạn có thể sao chép‑dán vào tệp có tên `generate_extended_barcode.py` và chạy trực tiếp. + +```python +import os +import aspose.barcode as barcode +from aspose.barcode.generation import ExtCodetextBuilder, BuildVersionInfo + +# ------------------------------------------------------------------ +# Optional: print library version – useful for troubleshooting +# ------------------------------------------------------------------ +ver = BuildVersionInfo() +print("Assembly version :", ver.ASSEMBLY_VERSION) +print("Product version :", f"{ver.PRODUCT_MAJOR}.{ver.PRODUCT_MINOR}") +print("Release date :", ver.RELEASE_DATE) + +# ------------------------------------------------------------------ +# Build extended codetext: plain numbers + Chinese characters (ECI 26) +# ------------------------------------------------------------------ +builder = ExtCodetextBuilder() +builder.add_plain_codetext("1234567890") # plain numeric data +builder.add_eci_codetext(26, "特殊字符") # Chinese characters using UTF‑8 +extended_codetext = builder.get_extended_codetext() +print("Extended codetext :", extended_codetext) + +# ------------------------------------------------------------------ +# Create a Code128 generator – supports the extended codetext format +# ------------------------------------------------------------------ +generator = barcode.generator.BarcodeGenerator( + barcode.Symbology.CODE_128, + extended_codetext +) + +# ------------------------------------------------------------------ +# Customize appearance (size, quiet zone, etc.) +# ------------------------------------------------------------------ +generator.parameters.barcode.x_dimension = 2 +generator.parameters.barcode.bar_height = 50 +generator.parameters.barcode.is_quiet_zone_visible = True +generator.parameters.barcode.quiet_zone = 10 + +# ------------------------------------------------------------------ +# Ensure output directory exists and save the image +# ------------------------------------------------------------------ +output_dir = "output" +os.makedirs(output_dir, exist_ok=True) +output_path = os.path.join(output_dir, "extended + + +## Bạn nên học gì tiếp theo? + +Các hướng dẫn sau đây đề cập đến các chủ đề liên quan chặt chẽ, xây dựng trên các kỹ thuật được trình bày trong hướng dẫn này. Mỗi tài nguyên bao gồm các ví dụ mã hoàn chỉnh với giải thích từng bước để giúp bạn làm chủ các tính năng API bổ sung và khám phá các cách triển khai thay thế trong dự án của mình. + +- [Cách tạo hình ảnh mã vạch với tùy chỉnh không gian bổ sung bằng Aspose.BarCode](/barcode/english/net/supplemental-barcode-data/supplemental-barcode-space-customization/) +- [Cách tạo hình ảnh mã vạch trong Java với Aspose.BarCode](/barcode/english/java/barcode-rendering-techniques/) +- [Cách tạo mã DataMatrix với Aspose.BarCode cho .NET](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-macro-configuration/) + +{{< /blocks/products/pf/tutorial-page-section >}} +{{< /blocks/products/pf/main-container >}} +{{< /blocks/products/pf/main-wrap-class >}} +{{< blocks/products/products-backtop-button >}} \ No newline at end of file