From 22d52398aa918c2e8c6d9c5b9c804aea95194784 Mon Sep 17 00:00:00 2001 From: Muhammad Adil Date: Sun, 9 Aug 2026 18:33:35 +0000 Subject: [PATCH] Add 1 barcode python tutorials MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Categories: general Source: AI Search API Tutorials: - Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide Auto-generated by Professionalize.Tutorials Agent --- .../_index.md | 265 +++++++++++++++++ .../_index.md | 263 ++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 267 +++++++++++++++++ .../og-image.png | Bin 0 -> 50315 bytes .../_index.md | 266 +++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 268 +++++++++++++++++ .../_index.md | 264 +++++++++++++++++ .../_index.md | 263 ++++++++++++++++ .../_index.md | 269 +++++++++++++++++ .../_index.md | 280 ++++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 261 ++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 266 +++++++++++++++++ .../_index.md | 267 +++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 266 +++++++++++++++++ .../_index.md | 263 ++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 265 +++++++++++++++++ .../_index.md | 265 +++++++++++++++++ 24 files changed, 6113 insertions(+) create mode 100644 barcode/arabic/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/chinese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/czech/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/dutch/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/english/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/english/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/og-image.png create mode 100644 barcode/french/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/german/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/greek/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/hindi/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/hongkong/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/hungarian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/indonesian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/italian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/japanese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/korean/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/polish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/portuguese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/russian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/spanish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/swedish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/thai/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/turkish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md create mode 100644 barcode/vietnamese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md diff --git a/barcode/arabic/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/arabic/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..f9dd0e99c --- /dev/null +++ b/barcode/arabic/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: إنشاء رمز QR في بايثون باستخدام Aspose.BarCode. تعلم كيفية بناء نص شفرة + موسع، وضبط المظهر، وحفظ الصورة—كل ذلك في دليل واحد. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: ar +lastmod: 2026-08-09 +og_description: إنشاء رمز QR في بايثون باستخدام Aspose.BarCode. يوضح هذا الدليل كيفية + بناء نص رمزي موسع، وضبط المعلمات البصرية، وتصدير الصورة. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: إنشاء رمز QR باستخدام Aspose.BarCode في بايثون – مثال كامل للكود +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: إنشاء رمز QR باستخدام Aspose.BarCode في بايثون – دليل خطوة بخطوة +url: /ar/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# إنشاء رمز QR باستخدام Aspose.BarCode في بايثون – دليل خطوة بخطوة + +إذا كنت بحاجة إلى **إنشاء رمز QR** في بايثون، فإن هذا الدليل سيقودك خلال العملية بالكامل باستخدام مكتبة Aspose.BarCode. سواءً كنت تقوم بترميز معرفات المنتجات، نص متعدد اللغات، أو بيانات مخصصة، ستتعرف على كيفية بناء نص موسع (extended codetext)، تعديل الإعدادات البصرية، وحفظ الصورة النهائية في سكريبت واحد قابل للتنفيذ. + +يوضح المثال أيضًا كيفية عرض إصدار المكتبة، ما يساعدك على التحقق من أنك تستخدم نسخة متوافقة. بنهاية هذا الدليل ستحصل على صورة رمز QR جاهزة للاستخدام وفهم واضح لكل خيار من خيارات التكوين. + +## المتطلبات المسبقة + +قبل أن تبدأ، تأكد من وجود ما يلي: + +- Python 3.8+ مثبت. +- حزمة `aspose-barcode` (تثبيت عبر `pip install aspose-barcode`). +- إلمام أساسي بصياغة بايثون. +- صلاحية كتابة إلى دليل الإخراج حيث سيتم حفظ ملف PNG. + +> **نصيحة احترافية:** استخدم بيئة افتراضية لتجنب تعارض الإصدارات مع مشاريع أخرى. + +## الخطوة 1: التحقق من إصدار مكتبة Aspose.BarCode + +عرض إصدار المكتبة يضمن أنك تستخدم نسخة تدعم النص الموسع وترميز QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**لماذا هذا مهم:** +قد تفتقر الإصدارات القديمة إلى الفئة `ExtCodetextBuilder` المطلوبة للمقاطع المختلطة بين النص العادي وECI. تأكيد الإصدار يمنع حدوث أخطاء وقت التشغيل لاحقًا في سير العمل. + +## الخطوة 2: بناء سلسلة نصية موسعة (extended codetext) + +النص الموسع يتيح لك دمج بيانات ASCII عادية مع مقاطع Unicode (ECI)، وهو أمر أساسي لأكواد QR متعددة اللغات. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**لماذا هذا مهم:** +طريقة `add_plain_codetext` تخزن البيانات كـ ASCII قياسي، بينما `add_eci_codetext` تُضيف بادئة كتلة Unicode بالمُعرّف المناسب لـ ECI. يضمن هذا أن قارئات QR تفسر النص الياباني بشكل صحيح، متجنبة الأحرف المشوشة. + +### الاختلافات الشائعة + +- **عدة مقاطع ECI:** استدعِ `add_eci_codetext` عدة مرات لدمج عدة لغات. +- **معرفات ECI مختلفة:** استخدم `27` لـ ISO‑8859‑1، `28` لـ ISO‑8859‑2، إلخ، حسب الترميز المستهدف. + +## الخطوة 3: إنشاء رمز QR باستخدام النص الموسع + +الآن بعد أن أصبح لدينا سلسلة مُنسقة بشكل صحيح، يمكننا إنشاء رمز QR. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**لماذا هذا مهم:** +`EncodeTypes.QR` يخبر Aspose.BarCode باستخدام رمزية QR. تمرير `extended_codetext` مباشرة يربط البيانات المختلطة بمصفوفة QR، محافظًا على كل من الجزء العادي والجزء Unicode. + +## الخطوة 4: تعديل المظهر البصري (اختياري لكن موصى به) + +ضبط المعلمات البصرية للباركود يحسن من موثوقية القراءة ويتماشى مع إرشادات العلامة التجارية. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**لماذا هذا مهم:** +- **`x_dimension`** يتحكم في حجم كل وحدة QR؛ إذا كان صغيرًا جدًا قد يسبب أخطاء قراءة على الأجهزة منخفضة الدقة. +- **`border_width`** يضيف منطقة هادئة. بعض القارئات تتطلب على الأقل منطقة هادئة بطول 4 وحدات؛ المكتبة تضيف ذلك تلقائيًا، لكن يمكنك زيادتها لمزيد من الأمان. + +### معالجة الحالات الخاصة + +- **بيانات عالية الكثافة:** إذا كان حجم البيانات المشفر كبيرًا، قد تحتاج إلى زيادة `x_dimension` أو اختيار مستوى تصحيح أخطاء أعلى (عبر `qr_generator.parameters.qr.error_correction_level`). +- **خلفية شفافة:** اضبط `qr_generator.parameters.barcode.bg_color = Color.Transparent` للحصول على PNGs ذات قناة ألفا. + +## الخطوة 5: حفظ صورة رمز QR + +أخيرًا، اكتب الصورة إلى القرص بالتنسيق المفضل لديك. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**لماذا هذا مهم:** +الحفظ بصيغة PNG يحافظ على جودة غير مضغوطة، وهو مثالي لأكواد QR التي تحتاج إلى حواف واضحة. إذا كنت تحتاج إلى تنسيق مختلف لتطبيق ويب، ما عليك سوى تغيير تعداد `BarCodeImageFormat`. + +### التحقق من النتيجة + +افتح الملف المحفوظ في أي عارض صور. يجب أن ترى رمز QR، وعند مسحه سيعيد السلسلة المدمجة: + +``` +ABC12345 +こんにちは +``` + +معظم تطبيقات قارئ QR الحديثة تعرض الجزء العادي أولًا ثم تُظهر التحية اليابانية بشكل صحيح. + +--- + +## البرنامج الكامل القابل للتنفيذ + +انسخ الكتلة الكاملة أدناه إلى ملف باسم `create_qr_barcode.py` وشغّله باستخدام `python create_qr_barcode.py`. عدّل `YOUR_DIRECTORY` إلى مجلد قابل للكتابة على جهازك. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +تشغيل هذا السكريبت يطبع الإصدار، النص الموسع، وتأكيد إنشاء ملف PNG. + +--- + +## الخلاصة + +أنت الآن تعرف كيف **تنشئ صور رموز QR** في بايثون باستخدام Aspose.BarCode. غطى الدليل: + +1. التحقق من إصدار المكتبة. +2. بناء نص موسع باستخدام مقاطع عادية وECI (Unicode). +3. إنشاء رمز QR. +4. تخصيص المعلمات البصرية مثل حجم الوحدة وعرض الحدود. +5. حفظ الصورة النهائية بصيغة PNG. + +من هنا يمكنك استكشاف: + +- تغيير مستويات تصحيح الأخطاء (`qr_generator.parameters.qr.error_correction_level`). +- إضافة شعار أو صورة خلفية (`qr_generator.parameters.qr.logo`). +- التصدير إلى صيغ أخرى مثل SVG للرسومات القابلة للتوسع على الويب. +- دمج المولد في نقطة نهاية Flask أو Django لإنشاء رموز QR عند الطلب. + +جرّب أحمال بيانات وإعدادات بصرية مختلفة لتتناسب مع هوية علامتك التجارية ومتطلبات القراءة. برمجة سعيدة! + +## ما الذي يجب أن تتعلمه بعد ذلك؟ + +الدروس التالية تغطي مواضيع ذات صلة وثيقة تبني على التقنيات التي تم توضيحها في هذا الدليل. كل مورد يتضمن أمثلة شاملة مع شرح خطوة بخطوة لمساعدتك على إتقان ميزات API إضافية واستكشاف أساليب تنفيذ بديلة في مشاريعك. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/chinese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..b84ad68f6 --- /dev/null +++ b/barcode/chinese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-08-09 +description: 使用 Aspose.BarCode 在 Python 中创建 QR 条码。学习如何构建扩展码文本、调整外观并保存图像——全部在一个教程中。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: zh +lastmod: 2026-08-09 +og_description: 使用 Aspose.BarCode 在 Python 中创建 QR 条码。本指南展示了如何构建扩展码文本、设置视觉参数以及导出图像。 +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: 使用 Aspose.BarCode 在 Python 中创建 QR 条码 – 完整代码示例 +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: 使用 Aspose.BarCode 在 Python 中创建 QR 条码 – 步骤指南 +url: /zh/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 使用 Aspose.BarCode 在 Python 中创建 QR 条码 – 步骤指南 + +如果您需要在 Python 中**创建 QR 条码**,本教程将使用 Aspose.BarCode 库手把手带您完成整个过程。无论是对产品 ID、多语言文本还是自定义数据进行编码,您都将看到如何构建扩展码文本、微调视觉设置,并在一个可直接运行的脚本中保存最终图像。 + +示例还演示了如何显示库版本,以帮助您确认正在使用兼容的发行版。阅读完本指南后,您将拥有可直接使用的 QR 条码图像,并清晰了解每个配置选项的作用。 + +## 前置条件 + +开始之前,请确保您已具备: + +- 已安装 Python 3.8+。 +- `aspose-barcode` 包(通过 `pip install aspose-barcode` 安装)。 +- 对 Python 语法有基本了解。 +- 对将保存 PNG 文件的输出目录拥有写入权限。 + +> **专业提示:** 使用虚拟环境可避免与其他项目的版本冲突。 + +## 第 1 步:验证 Aspose.BarCode 库版本 + +显示库版本可确保您使用的发行版支持扩展码文本和 QR 编码。 + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**为什么重要:** +旧版可能缺少用于混合普通和 ECI 段的 `ExtCodetextBuilder` 类。确认版本可以防止后续工作流中出现运行时错误。 + +## 第 2 步:构建扩展码文本字符串 + +扩展码文本允许您将普通 ASCII 数据与 Unicode(ECI)段组合,这对于多语言 QR 码至关重要。 + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**为什么重要:** +`add_plain_codetext` 方法以标准 ASCII 存储数据,而 `add_eci_codetext` 会在 Unicode 块前加上相应的 ECI 标识符。此做法确保 QR 扫描器能够正确解释日文文本,避免出现乱码。 + +### 常见变体 + +- **多个 ECI 段:** 多次调用 `add_eci_codetext` 可混合多种语言。 +- **不同的 ECI 标识符:** 根据目标编码使用 `27` 表示 ISO‑8859‑1、`28` 表示 ISO‑8859‑2 等。 + +## 第 3 步:使用扩展码文本生成 QR 条码 + +有了正确格式的字符串后,即可创建 QR 码。 + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**为什么重要:** +`EncodeTypes.QR` 告诉 Aspose.BarCode 使用 QR 符号。直接传入 `extended_codetext` 可将混合数据映射到 QR 矩阵中,保留普通和 Unicode 部分。 + +## 第 4 步:调整视觉外观(可选但推荐) + +微调条码的视觉参数可提升扫描可靠性并符合品牌规范。 + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**为什么重要:** +- **`x_dimension`** 控制每个 QR 模块的大小;过小可能导致低分辨率设备读取错误。 +- **`border_width`** 添加安静区。部分扫描器要求至少 4 模块的安静区;库会自动添加,但您可以增大以获得额外安全性。 + +### 边缘情况处理 + +- **高密度数据:** 若编码数据量大,可能需要增大 `x_dimension` 或通过 `qr_generator.parameters.qr.error_correction_level` 选择更高的纠错级别。 +- **透明背景:** 将 `qr_generator.parameters.barcode.bg_color = Color.Transparent` 设置为 PNG 的透明通道。 + +## 第 5 步:保存 QR 条码图像 + +最后,将图像写入磁盘,使用您偏好的格式。 + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**为什么重要:** +保存为 PNG 可保留无损质量,适合需要清晰边缘的 QR 码。如果 Web 应用需要其他格式,只需更改 `BarCodeImageFormat` 枚举即可。 + +### 验证结果 + +在任意图像查看器中打开保存的文件。您应看到一个 QR 码,扫描后返回组合后的字符串: + +``` +ABC12345 +こんにちは +``` + +大多数现代 QR 扫描应用会先显示普通段,然后正确渲染日文问候语。 + +--- + +## 完整可运行脚本 + +将下方代码块完整复制到名为 `create_qr_barcode.py` 的文件中,并使用 `python create_qr_barcode.py` 运行。将 `YOUR_DIRECTORY` 替换为您机器上可写入的文件夹路径。 + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +运行此脚本后会打印库版本、扩展码文本以及 PNG 文件创建成功的确认信息。 + +--- + +## 结论 + +您现在已经掌握了使用 Aspose.BarCode 在 Python 中**创建 QR 条码**图像的方法。教程涵盖了: + +1. 验证库版本。 +2. 使用普通和 ECI(Unicode)段构建扩展码文本。 +3. 生成 QR 码。 +4. 自定义模块大小、边框宽度等视觉参数。 +5. 以 PNG 格式保存最终图像。 + +接下来您可以进一步探索: + +- 更改纠错级别 (`qr_generator.parameters.qr.error_correction_level`)。 +- 添加徽标或背景图像 (`qr_generator.parameters.qr.logo`)。 +- 导出为 SVG 等可缩放的 Web 图形格式。 +- 将生成器集成到 Flask 或 Django 接口,实现即时 QR 码生成。 + +尝试不同的数据负载和视觉设置,以匹配您应用的品牌和扫描需求。祝编码愉快! + +## 接下来您可以学习什么? + +以下教程与本指南紧密相关,帮助您进一步掌握 API 功能并探索在项目中的其他实现方式。 + +- [如何使用 Aspose.BarCode for .NET 为 dotcode 创建扩展码文本](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [创建条码 Aspose .NET - 配置 DataMatrix 码文本](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [如何使用 Aspose.BarCode for .NET 为 ITF-14 创建条码静区](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/czech/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..0cc0ca96a --- /dev/null +++ b/barcode/czech/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Vytvořte QR kód v Pythonu pomocí Aspose.BarCode. Naučte se, jak vytvořit + rozšířený kódový text, upravit vzhled a uložit obrázek – vše v jednom tutoriálu. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: cs +lastmod: 2026-08-09 +og_description: Vytvořte QR čárový kód v Pythonu s Aspose.BarCode. Tento průvodce + ukazuje, jak vytvořit rozšířený kódový text, nastavit vizuální parametry a exportovat + obrázek. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Vytvořte QR čárový kód pomocí Aspose.BarCode v Pythonu – kompletní příklad + kódu +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Vytvořte QR kód pomocí Aspose.BarCode v Pythonu – krok za krokem +url: /cs/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Vytvoření QR čárového kódu pomocí Aspose.BarCode v Pythonu – krok za krokem + +Pokud potřebujete **vytvořit QR čárový kód** v Pythonu, tento tutoriál vás provede celým procesem pomocí knihovny Aspose.BarCode. Ať už kódujete ID produktů, vícejazyčný text nebo vlastní data, uvidíte, jak vytvořit rozšířený codetext, upravit vizuální nastavení a uložit finální obrázek v jediném spustitelném skriptu. + +Příklad také ukazuje, jak zobrazit verzi knihovny, což vám pomůže ověřit, že používáte kompatibilní vydání. Na konci tohoto průvodce budete mít připravený QR čárový kód a jasné pochopení každé konfigurační možnosti. + +## Prerequisites + +- Python 3.8+ nainstalován. +- Balíček `aspose-barcode` (nainstalujte pomocí `pip install aspose-barcode`). +- Základní znalost syntaxe Pythonu. +- Oprávnění k zápisu do výstupního adresáře, kam bude soubor PNG uložen. + +> **Tip:** Použijte virtuální prostředí, abyste se vyhnuli konfliktům verzí s ostatními projekty. + +## Krok 1: Ověření verze knihovny Aspose.BarCode + +Zobrazení verze knihovny zajišťuje, že používáte vydání, které podporuje rozšířený codetext a QR kódování. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Proč je to důležité:** +Starší vydání mohou postrádat třídu `ExtCodetextBuilder`, která je potřebná pro smíšené plain a ECI segmenty. Ověření verze zabraňuje pozdějším chybám za běhu. + +## Krok 2: Vytvoření řetězce rozšířeného codetextu + +Rozšířený codetext vám umožňuje kombinovat plain ASCII data s Unicode (ECI) segmenty, což je nezbytné pro vícejazyčné QR kódy. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Proč je to důležité:** +Metoda `add_plain_codetext` ukládá data jako standardní ASCII, zatímco `add_eci_codetext` přidává Unicode blok s odpovídajícím ECI designátorem. Tento přístup zajišťuje, že QR skenery interpretují japonský text správně a nedochází k poškozeným znakům. + +### Běžné varianty + +- **Více ECI segmentů:** Zavolejte `add_eci_codetext` několikrát pro smíchání několika jazyků. +- **Různé ECI identifikátory:** Použijte `27` pro ISO‑8859‑1, `28` pro ISO‑8859‑2 atd., podle cílového kódování. + +## Krok 3: Generování QR čárového kódu pomocí rozšířeného codetextu + +Nyní, když máme správně naformátovaný řetězec, můžeme vytvořit QR kód. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Proč je to důležité:** +`EncodeTypes.QR` říká Aspose.BarCode, aby použil symbologii QR. Předání `extended_codetext` přímo propojí smíšená data s QR mřížkou a zachová jak plain, tak Unicode část. + +## Krok 4: Úprava vizuálního vzhledu (volitelné, ale doporučené) + +Doladění vizuálních parametrů čárového kódu zlepšuje spolehlivost skenování a odpovídá firemním směrnicím. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Proč je to důležité:** +- **`x_dimension`** řídí velikost každého QR modulu; příliš malý může způsobit chyby čtení na nízkorozlišovacích zařízeních. +- **`border_width`** přidává tichou zónu. Některé skenery vyžadují alespoň 4‑modulovou tichou zónu; knihovna ji přidá automaticky, ale můžete ji zvýšit pro extra bezpečnost. + +### Řešení okrajových případů + +- **Vysoká hustota dat:** Pokud jsou kódovaná data velká, možná budete muset zvýšit `x_dimension` nebo zvolit vyšší úroveň opravy chyb (pomocí `qr_generator.parameters.qr.error_correction_level`). +- **Průhledné pozadí:** Nastavte `qr_generator.parameters.barcode.bg_color = Color.Transparent` pro PNG s alfa kanálem. + +## Krok 5: Uložení QR čárového kódu jako obrázku + +Nakonec zapíšeme obrázek na disk ve vámi preferovaném formátu. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Proč je to důležité:** +Ukládání jako PNG zachovává bezztrátovou kvalitu, což je ideální pro QR kódy, které potřebují ostré hrany. Pokud potřebujete jiný formát pro webovou aplikaci, stačí změnit výčtový typ `BarCodeImageFormat`. + +### Ověření výsledku + +Otevřete uložený soubor v libovolném prohlížeči obrázků. Měli byste vidět QR kód, který po nascanování vrátí kombinovaný řetězec: + +``` +ABC12345 +こんにちは +``` + +Většina moderních QR skenerů nejprve zobrazí plain segment a poté správně vykreslí japonské pozdravy. + +--- + +## Kompletní spustitelný skript + +Zkopírujte celý blok níže do souboru s názvem `create_qr_barcode.py` a spusťte jej pomocí `python create_qr_barcode.py`. Upravit `YOUR_DIRECTORY` na zapisovatelnou složku ve vašem počítači. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Spuštěním tohoto skriptu se vypíše verze, rozšířený codetext a potvrzení, že soubor PNG byl vytvořen. + +--- + +## Závěr + +Nyní víte, jak **vytvořit QR čárový kód** v Pythonu pomocí Aspose.BarCode. Tutoriál pokryl: + +1. Ověření verze knihovny. +2. Vytvoření rozšířeného codetextu s plain a ECI (Unicode) segmenty. +3. Generování QR kódu. +4. Přizpůsobení vizuálních parametrů, jako je velikost modulu a šířka okraje. +5. Uložení finálního obrázku ve formátu PNG. + +Odtud můžete dále zkoumat: + +- Změna úrovně opravy chyb (`qr_generator.parameters.qr.error_correction_level`). +- Přidání loga nebo obrázku pozadí (`qr_generator.parameters.qr.logo`). +- Export do dalších formátů, jako je SVG pro škálovatelnou webovou grafiku. +- Integrace generátoru do endpointu Flask nebo Django pro tvorbu QR kódu za běhu. + +Experimentujte s různými datovými náklady a vizuálními nastaveními, aby vyhovovaly značce a požadavkům na skenování vaší aplikace. Šťastné programování! + +## Co byste se měli naučit dál? + +Následující tutoriály pokrývají úzce související témata, která staví na technikách předvedených v tomto průvodci. Každý zdroj obsahuje kompletní funkční ukázky kódu s podrobnými vysvětleními, aby vám pomohl zvládnout další funkce API a prozkoumat alternativní přístupy ve vlastních projektech. + +- [Jak vytvořit rozšířený codetext pro dotcode pomocí Aspose.BarCode pro .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Vytvoření čárového kódu Aspose .NET – konfigurace textu DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Jak vytvořit tichou zónu čárového kódu pro ITF-14 pomocí Aspose.BarCode pro .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/dutch/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..086496c1e --- /dev/null +++ b/barcode/dutch/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Maak een QR-barcode in Python met Aspose.BarCode. Leer hoe je uitgebreide + codetekst maakt, het uiterlijk aanpast en de afbeelding opslaat — allemaal in één + tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: nl +lastmod: 2026-08-09 +og_description: Maak een QR-barcode in Python met Aspose.BarCode. Deze gids laat zien + hoe je uitgebreide codetekst maakt, visuele parameters instelt en de afbeelding + exporteert. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: QR-barcode maken met Aspose.BarCode in Python – volledig codevoorbeeld +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: QR‑barcode maken met Aspose.BarCode in Python – stapsgewijze handleiding +url: /nl/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# QR‑barcode maken met Aspose.BarCode in Python – stap‑voor‑stap gids + +Als je een **QR‑barcode** in Python moet maken, leidt deze tutorial je door het volledige proces met behulp van de Aspose.BarCode‑bibliotheek. Of je nu product‑ID's, meertalige tekst of aangepaste gegevens codeert, je ziet hoe je een uitgebreide codetext bouwt, visuele instellingen aanpast en de uiteindelijke afbeelding opslaat in één enkele, uitvoerbare script. + +Het voorbeeld laat ook zien hoe je de bibliotheekversie kunt weergeven, zodat je kunt verifiëren dat je een compatibele release gebruikt. Aan het einde van deze gids heb je een kant‑klaar QR‑barcode‑beeld en een duidelijk begrip van elke configuratie‑optie. + +## Vereisten + +- Python 3.8+ geïnstalleerd. +- Het `aspose-barcode`‑pakket (installeren via `pip install aspose-barcode`). +- Basiskennis van Python‑syntaxis. +- Schrijfrechten voor de doelmap waar het PNG‑bestand wordt opgeslagen. + +> **Pro tip:** Gebruik een virtuele omgeving om versieconflicten met andere projecten te vermijden. + +## Stap 1: Controleer de versie van de Aspose.BarCode‑bibliotheek + +Het weergeven van de bibliotheekversie zorgt ervoor dat je een release gebruikt die uitgebreide codetext en QR‑codering ondersteunt. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Waarom dit belangrijk is:** +Oudere releases kunnen de `ExtCodetextBuilder`‑klasse missen die nodig is voor gemengde gewone en ECI‑segmenten. Het bevestigen van de versie voorkomt runtime‑fouten later in de workflow. + +## Stap 2: Bouw een uitgebreide codetext‑string + +Een uitgebreide codetext laat je gewone ASCII‑gegevens combineren met Unicode (ECI)‑segmenten, wat essentieel is voor meertalige QR‑codes. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Waarom dit belangrijk is:** +De `add_plain_codetext`‑methode slaat gegevens op als standaard ASCII, terwijl `add_eci_codetext` een Unicode‑blok voorziet van de juiste ECI‑designator. Deze aanpak zorgt ervoor dat QR‑scanners de Japanse tekst correct interpreteren, waardoor vervormde tekens worden voorkomen. + +### Algemene variaties + +- **Meerdere ECI‑segmenten:** Roep `add_eci_codetext` meerdere keren aan om verschillende talen te combineren. +- **Verschillende ECI‑identifiers:** Gebruik `27` voor ISO‑8859‑1, `28` voor ISO‑8859‑2, enz., afhankelijk van je doel‑encoding. + +## Stap 3: Genereer de QR‑barcode met de uitgebreide codetext + +Nu we een correct geformatteerde string hebben, kunnen we de QR‑code maken. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Waarom dit belangrijk is:** +`EncodeTypes.QR` vertelt Aspose.BarCode om de QR‑symbologie te gebruiken. Het direct doorgeven van de `extended_codetext` koppelt de gemengde gegevens aan de QR‑matrix, waardoor zowel gewone als Unicode‑delen behouden blijven. + +## Stap 4: Pas het uiterlijk aan (optioneel maar aanbevolen) + +Fijn afstellen van de visuele parameters van de barcode verbetert de scanbetrouwbaarheid en sluit aan bij branding‑richtlijnen. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Waarom dit belangrijk is:** +- **`x_dimension`** bepaalt de grootte van elke QR‑module; te klein kan leesfouten veroorzaken op apparaten met lage resolutie. +- **`border_width`** voegt een stille zone toe. Sommige scanners vereisen minstens een stille zone van 4 modules; de bibliotheek voegt dit automatisch toe, maar je kunt het vergroten voor extra veiligheid. + +### Afhandeling van randgevallen + +- **Gegevens met hoge dichtheid:** Als de gecodeerde gegevens groot zijn, moet je mogelijk `x_dimension` verhogen of een hoger foutcorrectieniveau kiezen (via `qr_generator.parameters.qr.error_correction_level`). +- **Transparante achtergrond:** Stel `qr_generator.parameters.barcode.bg_color = Color.Transparent` in voor PNG‑bestanden met alfakanalen. + +## Stap 5: Sla de QR‑barcode‑afbeelding op + +Schrijf tenslotte de afbeelding naar schijf in het door jou gewenste formaat. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Waarom dit belangrijk is:** +Opslaan als PNG behoudt verliesvrije kwaliteit, wat ideaal is voor QR‑codes die scherpe randen nodig hebben. Als je een ander formaat voor een webapplicatie nodig hebt, wijzig dan eenvoudig de `BarCodeImageFormat`‑enumeratie. + +### Resultaat verifiëren + +Open het opgeslagen bestand in een willekeurige afbeeldingsviewer. Je zou een QR‑code moeten zien die, bij scanning, de gecombineerde string retourneert: + +``` +ABC12345 +こんにちは +``` + +De meeste moderne QR‑scanner‑apps tonen eerst het gewone segment en renderen vervolgens de Japanse begroeting correct. + +--- + +## Volledig uitvoerbaar script + +Kopieer het volledige blok hieronder naar een bestand genaamd `create_qr_barcode.py` en voer het uit met `python create_qr_barcode.py`. Pas `YOUR_DIRECTORY` aan naar een map waarin je kunt schrijven op je computer. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Het uitvoeren van dit script geeft de versie, de uitgebreide codetext en een bevestiging dat het PNG‑bestand is aangemaakt. + +--- + +## Conclusie + +Je weet nu hoe je **QR‑barcode**‑afbeeldingen in Python kunt maken met Aspose.BarCode. De tutorial behandelde: + +1. Het verifiëren van de bibliotheekversie. +2. Het bouwen van een uitgebreide codetext met gewone en ECI (Unicode) segmenten. +3. Het genereren van de QR‑code. +4. Het aanpassen van visuele parameters zoals modulegrootte en randbreedte. +5. Het opslaan van de uiteindelijke afbeelding in PNG‑formaat. + +Vanaf hier kun je verkennen: + +- Het wijzigen van foutcorrectieniveaus (`qr_generator.parameters.qr.error_correction_level`). +- Het toevoegen van een logo of achtergrondafbeelding (`qr_generator.parameters.qr.logo`). +- Exporteren naar andere formaten zoals SVG voor schaalbare webgrafieken. +- De generator integreren in een Flask‑ of Django‑endpoint voor realtime QR‑creatie. + +Experimenteer met verschillende gegevenspayloads en visuele instellingen om te passen bij de branding en scanvereisten van jouw applicatie. Veel programmeerplezier! + +## Wat moet je hierna leren? + +De volgende tutorials behandelen nauw verwante onderwerpen die voortbouwen op de technieken die in deze gids worden getoond. Elke bron bevat complete 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 maak je dotcode uitgebreide codetext met Aspose.BarCode voor .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Barcode maken aspose .net - Configureren van DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Hoe maak je Barcode Quiet Zone voor ITF-14 met Aspose.BarCode voor .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/english/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..1ab037573 --- /dev/null +++ b/barcode/english/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,267 @@ +--- +category: general +date: 2026-08-09 +description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: en +lastmod: 2026-08-09 +og_description: Create QR barcode in Python with Aspose.BarCode. This guide shows + how to build extended codetext, set visual parameters, and export the image. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Create QR barcode with Aspose.BarCode in Python – full code example +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide +url: /python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + +If you need to **create QR barcode** in Python, this tutorial walks you through the entire process using the Aspose.BarCode library. Whether you’re encoding product IDs, multilingual text, or custom data, you’ll see how to build an extended codetext, tweak visual settings, and save the final image in a single, runnable script. + +The example also demonstrates how to display the library version, which helps you verify that you’re running a compatible release. By the end of this guide you’ll have a ready‑to‑use QR barcode image and a clear understanding of each configuration option. + +## Prerequisites + +Before you start, make sure you have: + +- Python 3.8+ installed. +- The `aspose-barcode` package (install via `pip install aspose-barcode`). +- Basic familiarity with Python syntax. +- Write permission to the output directory where the PNG file will be saved. + +> **Pro tip:** Use a virtual environment to avoid version conflicts with other projects. + +## Step 1: Verify the Aspose.BarCode library version + +Displaying the library version ensures you’re using a release that supports extended codetext and QR encoding. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Why this matters:** +Older releases may lack the `ExtCodetextBuilder` class required for mixed plain and ECI segments. Confirming the version prevents runtime errors later in the workflow. + +## Step 2: Build an extended codetext string + +An extended codetext lets you combine plain ASCII data with Unicode (ECI) segments, which is essential for multilingual QR codes. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Why this matters:** +The `add_plain_codetext` method stores data as standard ASCII, while `add_eci_codetext` prefixes a Unicode block with the appropriate ECI designator. This approach ensures QR scanners interpret the Japanese text correctly, avoiding garbled characters. + +### Common variations + +- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to mix several languages. +- **Different ECI identifiers:** Use `27` for ISO‑8859‑1, `28` for ISO‑8859‑2, etc., depending on your target encoding. + +## Step 3: Generate the QR barcode using the extended codetext + +Now that we have a properly formatted string, we can create the QR code. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Why this matters:** +`EncodeTypes.QR` tells Aspose.BarCode to use the QR symbology. Passing the `extended_codetext` directly links the mixed data to the QR matrix, preserving both plain and Unicode parts. + +## Step 4: Adjust visual appearance (optional but recommended) + +Fine‑tuning the barcode’s visual parameters improves scan reliability and matches branding guidelines. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Why this matters:** +- **`x_dimension`** controls the size of each QR module; too small may cause read errors on low‑resolution devices. +- **`border_width`** adds a quiet zone. Some scanners require at least a 4‑module quiet zone; the library adds this automatically, but you can increase it for extra safety. + +### Edge case handling + +- **High‑density data:** If the encoded data is large, you may need to increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). +- **Transparent background:** Set `qr_generator.parameters.barcode.bg_color = Color.Transparent` for PNGs with alpha channels. + +## Step 5: Save the QR barcode image + +Finally, write the image to disk in your preferred format. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Why this matters:** +Saving as PNG preserves lossless quality, which is ideal for QR codes that need crisp edges. If you need a different format for a web application, simply change the `BarCodeImageFormat` enumeration. + +### Verifying the result + +Open the saved file in any image viewer. You should see a QR code that, when scanned, returns the combined string: + +``` +ABC12345 +こんにちは +``` + +Most modern QR scanner apps display the plain segment first and then render the Japanese greeting correctly. + +--- + +## Full runnable script + +Copy the entire block below into a file named `create_qr_barcode.py` and run it with `python create_qr_barcode.py`. Adjust `YOUR_DIRECTORY` to a writable folder on your machine. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Running this script prints the version, the extended codetext, and a confirmation that the PNG file was created. + +--- + +## Conclusion + +You now know how to **create QR barcode** images in Python using Aspose.BarCode. The tutorial covered: + +1. Verifying the library version. +2. Building extended codetext with plain and ECI (Unicode) segments. +3. Generating the QR code. +4. Customizing visual parameters such as module size and border width. +5. Saving the final image in PNG format. + +From here you can explore: + +- Changing error‑correction levels (`qr_generator.parameters.qr.error_correction_level`). +- Adding a logo or background image (`qr_generator.parameters.qr.logo`). +- Exporting to other formats like SVG for scalable web graphics. +- Integrating the generator into a Flask or Django endpoint for on‑the‑fly QR creation. + +Experiment with different data payloads and visual settings to fit your application’s branding and scanning requirements. Happy coding! + + +## 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 create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/og-image.png b/barcode/english/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/og-image.png new file mode 100644 index 0000000000000000000000000000000000000000..f778a2795fcd01144643036d4b4598b610301bb5 GIT binary patch literal 50315 zcmbSz1yoes+b(y42-mNcS#K09RqU@ z`o7<{*8SH1-gWO;EIn&;*!%2fKl_Q_^V=u*ostaBBeF+mXlOXHZzWaH(C(L^q1|=C zybHAaq}|3sLu*r&m3;HwZF+moS@+2XHO9VqqG{spt}WhsGW>>yljGf9E~UnEy#;rD z*CN*%5*Jqt%z_u+?h-trr5V33Supvgm3~s(~RSxtD9|;c#F9e%E9jnxP zNR&Fla~~KBxIEYyD*oP~-J$t=^X%C_zq{}Mx8d_=yuUYic(-o|TzAF){{Q+l=HDAk z%sYQ>URRe#J-EI5xt4WxZ2LyqMo3k<`)wUxo&tvJpJ#s8Wqbm|qd9?Q5fRhBLp-xp ze&2Mhk{cEm?QoVK_8*2@eT- zRH6d|R@_5PhntrJvJOxHUgtAa3CTQ-BsV5InO3)O_M5ih+s4m$BF3Ld%2((z-YDF@ zG$tlK&Ry6y1a&mF(XHNno+rekCA*IYCw>=9$cw_MnQ;SY<#z)HBvsnL=z?AmNPI z8=&vt@SNN6ZdK~Nl&27+DXXq2iyQjADl(`M4))7sLOS!Opn{ylFm4~a?>{^;=MvOB z^uxV9v5MOjM2jZ!Ej7oq08Sn$(_L(7Y@0tZ&PO1=Ya-0aHw5M8k-WM6v*RajLGQ-K z*d7)oF9&vtzInj$w5{zO-{3@@akrn0aun4Hx98Qb&#uY2>-DGC65>Ue`ud zc6LnnN|+3hdbI+>Nbd)DCe#=VeI(yq%;i9p`2IZ~PxY&(*p#dhdC6Icq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z0lb~4+qYdtFjwr5fmb)Q%M*R}`Td-1NkSGa78c*+Dl*6fs@xnah?T?yr_`4#T2 zQ*$(maw#h;DdSdWU~2EUx>;1vlsuHQQPntr8F49x0RwD`&V^0T2Q|CWM^;f%m8Z@@S^%=;)~J+6+R@7_2Dc3A0hp}fX4rJY3Ts6dr;52OjaHR#&SkV MT>e$Q=h($ literal 0 HcmV?d00001 diff --git a/barcode/french/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/french/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..fa1fcd73d --- /dev/null +++ b/barcode/french/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-08-09 +description: Créez un code‑QR en Python avec Aspose.BarCode. Apprenez à générer un + texte de code étendu, à ajuster l’apparence et à enregistrer l’image — le tout dans + un seul tutoriel. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: fr +lastmod: 2026-08-09 +og_description: Créer un code‑QR en Python avec Aspose.BarCode. Ce guide montre comment + générer un texte de code étendu, définir les paramètres visuels et exporter l’image. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Créer un code‑QR avec Aspose.BarCode en Python – exemple complet de code +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Créer un code‑barres QR avec Aspose.BarCode en Python – guide étape par étape +url: /fr/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Créer un code‑barres QR avec Aspose.BarCode en Python – guide étape par étape + +Si vous devez **créer un code‑barres QR** en Python, ce tutoriel vous guide à travers l’ensemble du processus en utilisant la bibliothèque Aspose.BarCode. Que vous codiez des identifiants de produit, du texte multilingue ou des données personnalisées, vous verrez comment construire un texte de code étendu, ajuster les paramètres visuels et enregistrer l’image finale dans un script unique et exécutable. + +L’exemple montre également comment afficher la version de la bibliothèque, ce qui vous aide à vérifier que vous utilisez une version compatible. À la fin de ce guide, vous disposerez d’une image de code‑barres QR prête à l’emploi et d’une compréhension claire de chaque option de configuration. + +## Prérequis + +Avant de commencer, assurez‑vous d’avoir : + +- Python 3.8+ installé. +- Le package `aspose-barcode` (installer via `pip install aspose-barcode`). +- Une connaissance de base de la syntaxe Python. +- Les droits d’écriture sur le répertoire de sortie où le fichier PNG sera enregistré. + +> **Astuce :** Utilisez un environnement virtuel pour éviter les conflits de version avec d’autres projets. + +## Étape 1 : Vérifier la version de la bibliothèque Aspose.BarCode + +Afficher la version de la bibliothèque garantit que vous utilisez une version qui prend en charge le texte de code étendu et l’encodage QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Pourquoi c’est important :** +Les versions antérieures peuvent ne pas contenir la classe `ExtCodetextBuilder` requise pour les segments mixtes plain et ECI. Confirmer la version évite les erreurs d’exécution ultérieures dans le flux de travail. + +## Étape 2 : Construire une chaîne de texte de code étendu + +Un texte de code étendu vous permet de combiner des données ASCII simples avec des segments Unicode (ECI), ce qui est essentiel pour les QR codes multilingues. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Pourquoi c’est important :** +La méthode `add_plain_codetext` stocke les données en ASCII standard, tandis que `add_eci_codetext` préfixe un bloc Unicode avec le désignateur ECI approprié. Cette approche garantit que les scanners QR interprètent correctement le texte japonais, évitant ainsi les caractères corrompus. + +### Variantes courantes + +- **Segments ECI multiples :** Appelez `add_eci_codetext` plusieurs fois pour mélanger plusieurs langues. +- **Identifiants ECI différents :** Utilisez `27` pour ISO‑8859‑1, `28` pour ISO‑8859‑2, etc., selon l’encodage cible. + +## Étape 3 : Générer le code‑barres QR à l’aide du texte de code étendu + +Maintenant que nous disposons d’une chaîne correctement formatée, nous pouvons créer le QR code. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Pourquoi c’est important :** +`EncodeTypes.QR` indique à Aspose.BarCode d’utiliser la symbologie QR. Passer directement `extended_codetext` lie les données mixtes à la matrice QR, préservant à la fois les parties plain et Unicode. + +## Étape 4 : Ajuster l’apparence visuelle (optionnel mais recommandé) + +Affiner les paramètres visuels du code‑barres améliore la fiabilité du scan et correspond aux directives de votre identité visuelle. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Pourquoi c’est important :** +- **`x_dimension`** contrôle la taille de chaque module QR ; une taille trop petite peut entraîner des erreurs de lecture sur des appareils à faible résolution. +- **`border_width`** ajoute une zone silencieuse. Certains scanners exigent au moins une zone silencieuse de 4 modules ; la bibliothèque l’ajoute automatiquement, mais vous pouvez l’augmenter pour plus de sécurité. + +### Gestion des cas limites + +- **Données à haute densité :** Si les données encodées sont volumineuses, vous devrez peut‑être augmenter `x_dimension` ou choisir un niveau de correction d’erreur supérieur (via `qr_generator.parameters.qr.error_correction_level`). +- **Arrière‑plan transparent :** Définissez `qr_generator.parameters.barcode.bg_color = Color.Transparent` pour des PNG avec canal alpha. + +## Étape 5 : Enregistrer l’image du code‑barres QR + +Enfin, écrivez l’image sur le disque dans le format de votre choix. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Pourquoi c’est important :** +Enregistrer au format PNG préserve une qualité sans perte, idéale pour les QR codes qui nécessitent des bords nets. Si vous avez besoin d’un autre format pour une application web, modifiez simplement l’énumération `BarCodeImageFormat`. + +### Vérification du résultat + +Ouvrez le fichier enregistré avec n’importe quel visualiseur d’images. Vous devriez voir un QR code qui, lorsqu’il est scanné, renvoie la chaîne combinée : + +``` +ABC12345 +こんにちは +``` + +La plupart des applications de lecture QR modernes affichent d’abord le segment plain, puis rendent correctement le salut japonais. + +--- + +## Script complet exécutable + +Copiez le bloc entier ci‑dessous dans un fichier nommé `create_qr_barcode.py` et exécutez‑le avec `python create_qr_barcode.py`. Ajustez `YOUR_DIRECTORY` vers un dossier accessible en écriture sur votre machine. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +L’exécution de ce script affiche la version, le texte de code étendu et une confirmation que le fichier PNG a été créé. + +--- + +## Conclusion + +Vous savez maintenant comment **créer des images de code‑barres QR** en Python avec Aspose.BarCode. Le tutoriel a couvert : + +1. Vérification de la version de la bibliothèque. +2. Construction d’un texte de code étendu avec des segments plain et ECI (Unicode). +3. Génération du QR code. +4. Personnalisation des paramètres visuels tels que la taille du module et la largeur de la bordure. +5. Enregistrement de l’image finale au format PNG. + +À partir d’ici, vous pouvez explorer : + +- Modifier les niveaux de correction d’erreur (`qr_generator.parameters.qr.error_correction_level`). +- Ajouter un logo ou une image d’arrière‑plan (`qr_generator.parameters.qr.logo`). +- Exporter vers d’autres formats comme SVG pour des graphiques web évolutifs. +- Intégrer le générateur dans un point de terminaison Flask ou Django pour créer des QR codes à la volée. + +Expérimentez avec différentes charges utiles et paramètres visuels pour adapter votre application aux exigences de marque et de numérisation. Bon codage ! + +## Que devez‑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 pas à pas pour vous aider à maîtriser des fonctionnalités API supplémentaires et à explorer des approches d’implémentation alternatives dans vos propres projets. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/german/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..3e287543f --- /dev/null +++ b/barcode/german/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Erstellen Sie einen QR‑Barcode in Python mit Aspose.BarCode. Erfahren + Sie, wie Sie erweiterten Codetext erstellen, das Aussehen anpassen und das Bild + speichern – alles in einem Tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: de +lastmod: 2026-08-09 +og_description: Erstellen Sie einen QR-Barcode in Python mit Aspose.BarCode. Dieser + Leitfaden zeigt, wie man erweiterten Codetext erstellt, visuelle Parameter festlegt + und das Bild exportiert. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: QR-Barcode mit Aspose.BarCode in Python erstellen – vollständiges Codebeispiel +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: QR-Barcode mit Aspose.BarCode in Python erstellen – Schritt‑für‑Schritt‑Anleitung +url: /de/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# QR-Barcode mit Aspose.BarCode in Python erstellen – Schritt‑für‑Schritt‑Anleitung + +Wenn Sie in Python **einen QR‑Barcode** erstellen müssen, führt Sie dieses Tutorial durch den gesamten Prozess mit der Aspose.BarCode‑Bibliothek. Egal, ob Sie Produkt‑IDs, mehrsprachigen Text oder benutzerdefinierte Daten codieren, Sie sehen, wie Sie einen erweiterten Codetext erstellen, visuelle Einstellungen anpassen und das endgültige Bild in einem einzigen, ausführbaren Skript speichern. + +Das Beispiel zeigt außerdem, wie die Bibliotheksversion angezeigt wird, was Ihnen hilft zu überprüfen, dass Sie eine kompatible Version verwenden. Am Ende dieser Anleitung haben Sie ein einsatzbereites QR‑Barcode‑Bild und ein klares Verständnis jeder Konfigurationsoption. + +## Voraussetzungen + +- Python 3.8+ installiert. +- `aspose-barcode`‑Paket (Installation über `pip install aspose-barcode`). +- Grundlegende Kenntnisse der Python‑Syntax. +- Schreibberechtigung für das Ausgabeverzeichnis, in dem die PNG‑Datei gespeichert wird. + +> **Pro Tipp:** Verwenden Sie eine virtuelle Umgebung, um Versionskonflikte mit anderen Projekten zu vermeiden. + +## Schritt 1: Überprüfen der Aspose.BarCode‑Bibliotheksversion + +Das Anzeigen der Bibliotheksversion stellt sicher, dass Sie eine Version verwenden, die erweiterten Codetext und QR‑Codierung unterstützt. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Warum das wichtig ist:** +Ältere Versionen können die für gemischte Plain‑ und ECI‑Segmente erforderliche Klasse `ExtCodetextBuilder` nicht enthalten. Die Versionsbestätigung verhindert Laufzeitfehler später im Workflow. + +## Schritt 2: Erstellen eines erweiterten Codetext‑Strings + +Ein erweiterter Codetext ermöglicht die Kombination von einfachem ASCII‑Daten mit Unicode‑(ECI‑)Segmenten, was für mehrsprachige QR‑Codes unerlässlich ist. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Warum das wichtig ist:** +Die Methode `add_plain_codetext` speichert Daten als Standard‑ASCII, während `add_eci_codetext` einen Unicode‑Block mit dem entsprechenden ECI‑Bezeichner versieht. Dieser Ansatz stellt sicher, dass QR‑Scanner den japanischen Text korrekt interpretieren und keine fehlerhaften Zeichen erzeugen. + +### Häufige Variationen + +- **Mehrere ECI‑Segmente:** Rufen Sie `add_eci_codetext` mehrmals auf, um mehrere Sprachen zu mischen. +- **Verschiedene ECI‑Kennungen:** Verwenden Sie `27` für ISO‑8859‑1, `28` für ISO‑8859‑2 usw., je nach gewünschter Zielcodierung. + +## Schritt 3: QR‑Barcode mit dem erweiterten Codetext erzeugen + +Da wir nun einen korrekt formatierten String haben, können wir den QR‑Code erstellen. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Warum das wichtig ist:** +`EncodeTypes.QR` weist Aspose.BarCode an, die QR‑Symbologie zu verwenden. Das direkte Übergeben des `extended_codetext` verknüpft die gemischten Daten mit der QR‑Matrix und bewahrt sowohl den Plain‑ als auch den Unicode‑Teil. + +## Schritt 4: Visuelle Darstellung anpassen (optional, aber empfohlen) + +Die Feinabstimmung der visuellen Parameter des Barcodes verbessert die Scan‑Zuverlässigkeit und entspricht den Markenrichtlinien. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Warum das wichtig ist:** +- **`x_dimension`** steuert die Größe jedes QR‑Moduls; zu klein kann auf Geräten mit niedriger Auflösung Lesefehler verursachen. +- **`border_width`** fügt eine Ruhezone hinzu. Einige Scanner benötigen mindestens eine 4‑Modul‑Ruhezone; die Bibliothek fügt diese automatisch hinzu, Sie können sie jedoch zur zusätzlichen Sicherheit vergrößern. + +### Behandlung von Randfällen + +- **Daten hoher Dichte:** Wenn die codierten Daten groß sind, müssen Sie möglicherweise `x_dimension` erhöhen oder ein höheres Fehlerkorrektur‑Level wählen (über `qr_generator.parameters.qr.error_correction_level`). +- **Transparenter Hintergrund:** Setzen Sie `qr_generator.parameters.barcode.bg_color = Color.Transparent` für PNGs mit Alphakanälen. + +## Schritt 5: QR‑Barcode‑Bild speichern + +Schließlich schreiben Sie das Bild in Ihrem bevorzugten Format auf die Festplatte. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Warum das wichtig ist:** +Das Speichern als PNG bewahrt die verlustfreie Qualität, was ideal für QR‑Codes mit scharfen Kanten ist. Wenn Sie für eine Web‑Anwendung ein anderes Format benötigen, ändern Sie einfach die Aufzählung `BarCodeImageFormat`. + +### Ergebnis überprüfen + +Öffnen Sie die gespeicherte Datei in einem Bildbetrachter. Sie sollten einen QR‑Code sehen, der beim Scannen den kombinierten String zurückgibt: + +``` +ABC12345 +こんにちは +``` + +Die meisten modernen QR‑Scanner‑Apps zeigen zuerst das Plain‑Segment an und rendern dann die japanische Begrüßung korrekt. + +--- + +## Vollständiges ausführbares Skript + +Kopieren Sie den gesamten Block unten in eine Datei mit dem Namen `create_qr_barcode.py` und führen Sie sie mit `python create_qr_barcode.py` aus. Passen Sie `YOUR_DIRECTORY` an einen beschreibbaren Ordner auf Ihrem Rechner an. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Das Ausführen dieses Skripts gibt die Version, den erweiterten Codetext und eine Bestätigung aus, dass die PNG‑Datei erstellt wurde. + +--- + +## Fazit + +Sie wissen jetzt, wie Sie mit Aspose.BarCode in Python **QR‑Barcode**‑Bilder erstellen. Das Tutorial behandelte: + +1. Überprüfen der Bibliotheksversion. +2. Erstellen eines erweiterten Codetexts mit Plain‑ und ECI‑(Unicode‑)Segmenten. +3. Generieren des QR‑Codes. +4. Anpassen visueller Parameter wie Modulgröße und Randbreite. +5. Speichern des finalen Bildes im PNG‑Format. + +Ab hier können Sie Folgendes erkunden: + +- Ändern der Fehlerkorrektur‑Levels (`qr_generator.parameters.qr.error_correction_level`). +- Hinzufügen eines Logos oder Hintergrundbildes (`qr_generator.parameters.qr.logo`). +- Exportieren in andere Formate wie SVG für skalierbare Web‑Grafiken. +- Integration des Generators in einen Flask‑ oder Django‑Endpoint für die sofortige QR‑Erstellung. + +Experimentieren Sie mit verschiedenen Datenpayloads und visuellen Einstellungen, um die Marken‑ und Scan‑Anforderungen Ihrer Anwendung zu erfüllen. Viel Spaß beim Coden! + +## Was sollten Sie als Nächstes lernen? + +Die folgenden Tutorials behandeln eng verwandte Themen, die auf den in diesem Leitfaden gezeigten Techniken aufbauen. Jede Ressource enthält vollständige funktionierende Code‑Beispiele mit Schritt‑für‑Schritt‑Erklärungen, um Ihnen zu helfen, zusätzliche API‑Funktionen zu meistern und alternative Implementierungsansätze in Ihren eigenen Projekten zu erkunden. + +- [Wie man erweiterten Dotcode‑Codetext mit Aspose.BarCode für .NET erstellt](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Barcode mit Aspose .NET erstellen – DataMatrix‑Codetext konfigurieren](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Wie man eine Barcode‑Ruhezone für ITF‑14 mit Aspose.BarCode für .NET erstellt](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/greek/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..91d4992cc --- /dev/null +++ b/barcode/greek/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,268 @@ +--- +category: general +date: 2026-08-09 +description: Δημιουργήστε κωδικό QR σε Python χρησιμοποιώντας το Aspose.BarCode. Μάθετε + πώς να δημιουργήσετε επεκταμένο κείμενο κώδικα, να προσαρμόσετε την εμφάνιση και + να αποθηκεύσετε την εικόνα—όλα σε ένα μόνο σεμινάριο. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: el +lastmod: 2026-08-09 +og_description: Δημιουργήστε κωδικό QR σε Python με το Aspose.BarCode. Αυτός ο οδηγός + δείχνει πώς να δημιουργήσετε εκτεταμένο κείμενο κώδικα, να ορίσετε οπτικές παραμέτρους + και να εξάγετε την εικόνα. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Δημιουργία QR barcode με το Aspose.BarCode σε Python – πλήρες παράδειγμα + κώδικα +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Δημιουργία QR barcode με το Aspose.BarCode σε Python – βήμα‑βήμα οδηγός +url: /el/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Δημιουργία QR barcode με Aspose.BarCode σε Python – βήμα‑βήμα οδηγός + +Αν χρειάζεστε **να δημιουργήσετε QR barcode** σε Python, αυτό το tutorial σας καθοδηγεί σε όλη τη διαδικασία χρησιμοποιώντας τη βιβλιοθήκη Aspose.BarCode. Είτε κωδικοποιείτε IDs προϊόντων, πολυγλωσσικό κείμενο ή προσαρμοσμένα δεδομένα, θα δείτε πώς να δημιουργήσετε ένα εκτεταμένο codetext, να ρυθμίσετε τις οπτικές παραμέτρους και να αποθηκεύσετε την τελική εικόνα σε ένα ενιαίο, εκτελέσιμο script. + +Το παράδειγμα δείχνει επίσης πώς να εμφανίσετε την έκδοση της βιβλιοθήκης, κάτι που σας βοηθά να επαληθεύσετε ότι τρέχετε μια συμβατή έκδοση. Στο τέλος αυτού του οδηγού θα έχετε μια έτοιμη προς χρήση εικόνα QR barcode και μια σαφή κατανόηση κάθε επιλογής διαμόρφωσης. + +## Προαπαιτούμενα + +Πριν ξεκινήσετε, βεβαιωθείτε ότι έχετε: + +- Python 3.8+ εγκατεστημένο. +- Το πακέτο `aspose-barcode` (εγκατάσταση μέσω `pip install aspose-barcode`). +- Βασική εξοικείωση με τη σύνταξη της Python. +- Δικαίωμα εγγραφής στον φάκελο εξόδου όπου θα αποθηκευτεί το αρχείο PNG. + +> **Συμβουλή επαγγελματία:** Χρησιμοποιήστε ένα εικονικό περιβάλλον για να αποφύγετε συγκρούσεις εκδόσεων με άλλα έργα. + +## Βήμα 1: Επαλήθευση της έκδοσης της βιβλιοθήκης Aspose.BarCode + +Η εμφάνιση της έκδοσης της βιβλιοθήκης διασφαλίζει ότι χρησιμοποιείτε μια έκδοση που υποστηρίζει extended codetext και κωδικοποίηση QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Γιατί είναι σημαντικό:** +Οι παλαιότερες εκδόσεις μπορεί να μην περιλαμβάνουν την κλάση `ExtCodetextBuilder` που απαιτείται για μίξη απλού κειμένου και τμημάτων ECI. Η επιβεβαίωση της έκδοσης αποτρέπει σφάλματα χρόνου εκτέλεσης αργότερα στη ροή εργασίας. + +## Βήμα 2: Δημιουργία μιας συμβολοσειράς extended codetext + +Ένα extended codetext σας επιτρέπει να συνδυάσετε δεδομένα ASCII απλού κειμένου με τμήματα Unicode (ECI), κάτι που είναι απαραίτητο για πολυγλωσσικούς QR κώδικες. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Γιατί είναι σημαντικό:** +Η μέθοδος `add_plain_codetext` αποθηκεύει τα δεδομένα ως τυπικό ASCII, ενώ η `add_eci_codetext` προσθέτει πρόθεμα σε ένα μπλοκ Unicode με τον κατάλληλο σχεδιαστή ECI. Αυτή η προσέγγιση εξασφαλίζει ότι οι σαρωτές QR ερμηνεύουν σωστά το ιαπωνικό κείμενο, αποφεύγοντας ακατάλληλους χαρακτήρες. + +### Συνηθισμένες παραλλαγές + +- **Πολλαπλά τμήματα ECI:** Καλέστε `add_eci_codetext` πολλές φορές για να συνδυάσετε διάφορες γλώσσες. +- **Διαφορετικοί ταυτοποιητές ECI:** Χρησιμοποιήστε `27` για ISO‑8859‑1, `28` για ISO‑8859‑2 κ.λπ., ανάλογα με την κωδικοποίηση-στόχο σας. + +## Βήμα 3: Δημιουργία του QR barcode χρησιμοποιώντας το extended codetext + +Τώρα που έχουμε μια σωστά μορφοποιημένη συμβολοσειρά, μπορούμε να δημιουργήσουμε τον QR κώδικα. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Γιατί είναι σημαντικό:** +`EncodeTypes.QR` ενημερώνει το Aspose.BarCode να χρησιμοποιήσει τη συμβολή QR. Η άμεση παροχή του `extended_codetext` συνδέει τα μιξαρισμένα δεδομένα με το QR matrix, διατηρώντας τόσο το απλό όσο και το Unicode τμήμα. + +## Βήμα 4: Προσαρμογή της οπτικής εμφάνισης (προαιρετικό αλλά συνιστάται) + +Η λεπτομερής ρύθμιση των οπτικών παραμέτρων του barcode βελτιώνει την αξιοπιστία σάρωσης και ταιριάζει με τις οδηγίες branding. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Γιατί είναι σημαντικό:** +- **`x_dimension`** ελέγχει το μέγεθος κάθε μονάδας QR· πολύ μικρό μέγεθος μπορεί να προκαλέσει σφάλματα ανάγνωσης σε συσκευές χαμηλής ανάλυσης. +- **`border_width`** προσθέτει μια ήσυχη ζώνη. Κάποιοι σαρωτές απαιτούν τουλάχιστον μια ζώνη 4 μονάδων· η βιβλιοθήκη την προσθέτει αυτόματα, αλλά μπορείτε να την αυξήσετε για επιπλέον ασφάλεια. + +### Διαχείριση ειδικών περιπτώσεων + +- **Δεδομένα υψηλής πυκνότητας:** Εάν τα κωδικοποιημένα δεδομένα είναι μεγάλα, ίσως χρειαστεί να αυξήσετε το `x_dimension` ή να επιλέξετε υψηλότερο επίπεδο διόρθωσης σφαλμάτων (μέσω `qr_generator.parameters.qr.error_correction_level`). +- **Διαφάνεια φόντου:** Ορίστε `qr_generator.parameters.barcode.bg_color = Color.Transparent` για PNG με κανάλια άλφα. + +## Βήμα 5: Αποθήκευση της εικόνας QR barcode + +Τέλος, γράψτε την εικόνα στο δίσκο στη μορφή που προτιμάτε. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Γιατί είναι σημαντικό:** +Η αποθήκευση ως PNG διατηρεί την απώλεια-απώλεια ποιότητα, κάτι ιδανικό για QR κώδικες που απαιτούν καθαρά άκρα. Εάν χρειάζεστε διαφορετική μορφή για μια web εφαρμογή, απλώς αλλάξτε την απαρίθμηση `BarCodeImageFormat`. + +### Επαλήθευση του αποτελέσματος + +Ανοίξτε το αποθηκευμένο αρχείο σε οποιονδήποτε προβολέα εικόνων. Θα πρέπει να δείτε έναν QR κώδικα που, όταν σαρωθεί, επιστρέφει τη συνδυασμένη συμβολοσειρά: + +``` +ABC12345 +こんにちは +``` + +Οι περισσότερες σύγχρονες εφαρμογές σάρωσης QR εμφανίζουν πρώτα το απλό τμήμα και στη συνέχεια αποδίδουν σωστά το ιαπωνικό χαιρετισμό. + +--- + +## Πλήρες εκτελέσιμο script + +Αντιγράψτε ολόκληρο το παρακάτω μπλοκ σε ένα αρχείο με όνομα `create_qr_barcode.py` και εκτελέστε το με `python create_qr_barcode.py`. Προσαρμόστε το `YOUR_DIRECTORY` σε έναν φάκελο με δικαιώματα εγγραφής στη μηχανή σας. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Η εκτέλεση αυτού του script εκτυπώνει την έκδοση, το extended codetext και μια επιβεβαίωση ότι το αρχείο PNG δημιουργήθηκε. + +--- + +## Συμπέρασμα + +Τώρα ξέρετε πώς να **δημιουργήσετε QR barcode** εικόνες σε Python χρησιμοποιώντας το Aspose.BarCode. Ο οδηγός κάλυψε: + +1. Επαλήθευση της έκδοσης της βιβλιοθήκης. +2. Δημιουργία extended codetext με απλό και τμήματα ECI (Unicode). +3. Δημιουργία του QR κώδικα. +4. Προσαρμογή οπτικών παραμέτρων όπως το μέγεθος μονάδας και το πλάτος περιθωρίου. +5. Αποθήκευση της τελικής εικόνας σε μορφή PNG. + +Από εδώ μπορείτε να εξερευνήσετε: + +- Αλλαγή επιπέδων διόρθωσης σφαλμάτων (`qr_generator.parameters.qr.error_correction_level`). +- Προσθήκη λογότυπου ή εικόνας φόντου (`qr_generator.parameters.qr.logo`). +- Εξαγωγή σε άλλες μορφές όπως SVG για κλιμακούμενα web γραφικά. +- Ενσωμάτωση του γεννήτρια σε ένα endpoint Flask ή Django για δημιουργία QR σε πραγματικό χρόνο. + +Πειραματιστείτε με διαφορετικά payload δεδομένων και οπτικές ρυθμίσεις ώστε να ταιριάζουν με το branding και τις απαιτήσεις σάρωσης της εφαρμογής σας. Καλό κώδικα! + +## Τι πρέπει να μάθετε στη συνέχεια; + +Τα παρακάτω tutorials καλύπτουν στενά σχετιζόμενα θέματα που επεκτείνουν τις τεχνικές που παρουσιάστηκαν σε αυτόν τον οδηγό. Κάθε πόρος περιλαμβάνει πλήρη λειτουργικά παραδείγματα κώδικα με βήμα‑βήμα εξηγήσεις για να σας βοηθήσουν να κατακτήσετε πρόσθετες δυνατότητες του API και να εξερευνήσετε εναλλακτικές προσεγγίσεις υλοποίησης στα δικά σας έργα. + +- [Πώς να δημιουργήσετε dotcode extended codetext με Aspose.BarCode για .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Δημιουργία barcode aspose .net - Διαμόρφωση κειμένου DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Πώς να δημιουργήσετε Quiet Zone για ITF-14 χρησιμοποιώντας Aspose.BarCode για .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/hindi/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..cffcd6e36 --- /dev/null +++ b/barcode/hindi/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,264 @@ +--- +category: general +date: 2026-08-09 +description: Aspose.BarCode का उपयोग करके Python में QR बारकोड बनाएं। विस्तारित कोडटेक्स्ट + कैसे बनाएं, दिखावट को कैसे समायोजित करें, और छवि को कैसे सहेजें—सब कुछ एक ही ट्यूटोरियल + में सीखें। +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: hi +lastmod: 2026-08-09 +og_description: Aspose.BarCode के साथ Python में QR बारकोड बनाएं। यह गाइड दिखाता है + कि विस्तारित कोडटेक्स्ट कैसे बनाएं, दृश्य पैरामीटर सेट करें, और छवि निर्यात करें। +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Python में Aspose.BarCode के साथ QR बारकोड बनाएं – पूर्ण कोड उदाहरण +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Python में Aspose.BarCode के साथ QR बारकोड बनाएं – चरण‑दर‑चरण मार्गदर्शिका +url: /hi/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Python में Aspose.BarCode के साथ QR बारकोड बनाएं – चरण‑दर‑चरण गाइड + +यदि आपको Python में **QR बारकोड बनाना** है, तो यह ट्यूटोरियल Aspose.BarCode लाइब्रेरी का उपयोग करके पूरी प्रक्रिया को समझाता है। चाहे आप प्रोडक्ट आईडी, बहुभाषी टेक्स्ट, या कस्टम डेटा एन्कोड कर रहे हों, आप देखेंगे कि कैसे विस्तारित कोडटेक्स्ट बनाएं, विज़ुअल सेटिंग्स को समायोजित करें, और अंतिम इमेज को एक ही चलाने योग्य स्क्रिप्ट में सहेजें। + +उदाहरण यह भी दर्शाता है कि लाइब्रेरी संस्करण कैसे प्रदर्शित करें, जिससे आप यह सत्यापित कर सकें कि आप संगत रिलीज़ चला रहे हैं। इस गाइड के अंत तक आपके पास उपयोग के लिए तैयार QR बारकोड इमेज और प्रत्येक कॉन्फ़िगरेशन विकल्प की स्पष्ट समझ होगी। + +## पूर्वापेक्षाएँ + +- Python 3.8+ स्थापित हो। +- `aspose-barcode` पैकेज (इंस्टॉल करने के लिए `pip install aspose-barcode`)। +- Python सिंटैक्स की मूल समझ। +- PNG फ़ाइल को सहेजने वाले आउटपुट डायरेक्टरी में लिखने की अनुमति। + +> **Pro tip:** अन्य प्रोजेक्ट्स के साथ संस्करण टकराव से बचने के लिए वर्चुअल एनवायरनमेंट का उपयोग करें। + +## चरण 1: Aspose.BarCode लाइब्रेरी संस्करण सत्यापित करें + +लाइब्रेरी संस्करण प्रदर्शित करने से यह सुनिश्चित होता है कि आप वह रिलीज़ उपयोग कर रहे हैं जो विस्तारित कोडटेक्स्ट और QR एन्कोडिंग का समर्थन करता है। + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Why this matters:** +पुराने रिलीज़ में `ExtCodetextBuilder` क्लास नहीं हो सकता है, जो मिश्रित प्लेन और ECI सेगमेंट्स के लिए आवश्यक है। संस्करण की पुष्टि करने से बाद में वर्कफ़्लो में रनटाइम त्रुटियों से बचा जा सकता है। + +## चरण 2: विस्तारित कोडटेक्स्ट स्ट्रिंग बनाएं + +एक विस्तारित कोडटेक्स्ट आपको प्लेन ASCII डेटा को Unicode (ECI) सेगमेंट्स के साथ मिलाने की अनुमति देता है, जो बहुभाषी QR कोड्स के लिए आवश्यक है। + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Why this matters:** +`add_plain_codetext` मेथड डेटा को मानक ASCII के रूप में संग्रहीत करता है, जबकि `add_eci_codetext` उपयुक्त ECI डिज़ाइनटर के साथ Unicode ब्लॉक को प्रीफ़िक्स करता है। यह दृष्टिकोण सुनिश्चित करता है कि QR स्कैनर जापानी टेक्स्ट को सही ढंग से व्याख्या करे, जिससे गड़बड़ अक्षर नहीं आएँगे। + +### सामान्य विविधताएँ + +- **एकाधिक ECI खंड:** कई भाषाओं को मिलाने के लिए `add_eci_codetext` को कई बार कॉल करें। +- **विभिन्न ECI पहचानकर्ता:** अपने लक्ष्य एन्कोडिंग के अनुसार `27` को ISO‑8859‑1, `28` को ISO‑8859‑2 आदि के लिए उपयोग करें। + +## चरण 3: विस्तारित कोडटेक्स्ट का उपयोग करके QR बारकोड जनरेट करें + +अब हमारे पास सही फ़ॉर्मेटेड स्ट्रिंग है, हम QR कोड बना सकते हैं। + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Why this matters:** +`EncodeTypes.QR` Aspose.BarCode को QR सिम्बोलॉजी उपयोग करने के लिए बताता है। `extended_codetext` को सीधे पास करने से मिश्रित डेटा QR मैट्रिक्स से जुड़ता है, जिससे प्लेन और Unicode दोनों भाग संरक्षित रहते हैं। + +## चरण 4: दृश्य रूप को समायोजित करें (वैकल्पिक लेकिन अनुशंसित) + +बारकोड के विज़ुअल पैरामीटर को फाइन‑ट्यून करने से स्कैन विश्वसनीयता में सुधार होता है और ब्रांडिंग गाइडलाइन्स के साथ मेल खाता है। + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Why this matters:** +- **`x_dimension`** प्रत्येक QR मॉड्यूल का आकार नियंत्रित करता है; बहुत छोटा होने पर कम‑रिज़ॉल्यूशन डिवाइस पर पढ़ने में त्रुटियां हो सकती हैं। +- **`border_width`** एक क्वाइट ज़ोन जोड़ता है। कुछ स्कैनर कम से कम 4‑मॉड्यूल क्वाइट ज़ोन की आवश्यकता रखते हैं; लाइब्रेरी इसे स्वचालित रूप से जोड़ती है, लेकिन आप अतिरिक्त सुरक्षा के लिए इसे बढ़ा सकते हैं। + +### किनारे के मामलों का प्रबंधन + +- **उच्च‑घनत्व डेटा:** यदि एन्कोडेड डेटा बड़ा है, तो आपको `x_dimension` बढ़ाने या उच्च त्रुटि‑सुधार स्तर चुनने की आवश्यकता हो सकती है (`qr_generator.parameters.qr.error_correction_level` के माध्यम से)। +- **पारदर्शी पृष्ठभूमि:** PNG में अल्फा चैनल के लिए `qr_generator.parameters.barcode.bg_color = Color.Transparent` सेट करें। + +## चरण 5: QR बारकोड इमेज सहेजें + +अंत में, इमेज को अपनी पसंदीदा फ़ॉर्मेट में डिस्क पर लिखें। + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Why this matters:** +PNG के रूप में सहेजने से लॉसलेस क्वालिटी बनी रहती है, जो तेज़ किनारों वाले QR कोड्स के लिए आदर्श है। यदि आपको वेब एप्लिकेशन के लिए अलग फ़ॉर्मेट चाहिए, तो बस `BarCodeImageFormat` एनेमरेशन बदल दें। + +### परिणाम की पुष्टि + +किसी भी इमेज व्यूअर में सहेजी गई फ़ाइल खोलें। आपको एक QR कोड दिखना चाहिए जो स्कैन करने पर संयुक्त स्ट्रिंग लौटाता है: + +``` +ABC12345 +こんにちは +``` + +अधिकांश आधुनिक QR स्कैनर ऐप्स पहले प्लेन सेगमेंट दिखाते हैं और फिर जापानी अभिवादन को सही ढंग से रेंडर करते हैं। + +--- + +## पूर्ण चलाने योग्य स्क्रिप्ट + +नीचे दिया गया पूरा ब्लॉक `create_qr_barcode.py` नाम की फ़ाइल में कॉपी करें और `python create_qr_barcode.py` के साथ चलाएँ। `YOUR_DIRECTORY` को अपने मशीन पर लिखने योग्य फ़ोल्डर में बदलें। + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +इस स्क्रिप्ट को चलाने से संस्करण, विस्तारित कोडटेक्स्ट, और यह पुष्टि प्रिंट होगी कि PNG फ़ाइल बनाई गई है। + +--- + +## निष्कर्ष + +आप अब जानते हैं कि Python में Aspose.BarCode का उपयोग करके **QR बारकोड** इमेज कैसे बनाते हैं। ट्यूटोरियल ने निम्नलिखित विषयों को कवर किया: + +1. लाइब्रेरी संस्करण की पुष्टि करना। +2. प्लेन और ECI (Unicode) सेगमेंट्स के साथ विस्तारित कोडटेक्स्ट बनाना। +3. QR कोड जनरेट करना। +4. मॉड्यूल आकार और बॉर्डर चौड़ाई जैसे विज़ुअल पैरामीटर को कस्टमाइज़ करना। +5. अंतिम इमेज को PNG फ़ॉर्मेट में सहेजना। + +अब आप आगे खोज सकते हैं: + +- त्रुटि‑सुधार स्तर बदलना (`qr_generator.parameters.qr.error_correction_level`)। +- लोगो या बैकग्राउंड इमेज जोड़ना (`qr_generator.parameters.qr.logo`)। +- SVG जैसे अन्य फ़ॉर्मैट में एक्सपोर्ट करना, जो स्केलेबल वेब ग्राफ़िक्स के लिए उपयुक्त है। +- Flask या Django एन्डपॉइंट में जनरेटर को इंटीग्रेट करना ताकि ऑन‑द‑फ्लाई QR निर्माण हो सके। + +विभिन्न डेटा पेलोड और विज़ुअल सेटिंग्स के साथ प्रयोग करें ताकि आपके एप्लिकेशन की ब्रांडिंग और स्कैनिंग आवश्यकताओं के अनुरूप हो सके। Happy coding! + +## आगे आप क्या सीखें? + +निम्नलिखित ट्यूटोरियल्स उन विषयों को कवर करते हैं जो इस गाइड में प्रदर्शित तकनीकों पर आधारित हैं। प्रत्येक संसाधन में पूर्ण कार्यशील कोड उदाहरण और चरण‑दर‑चरण व्याख्याएँ शामिल हैं, जिससे आप अतिरिक्त API फीचर्स में निपुण हो सकें और अपने प्रोजेक्ट्स में वैकल्पिक इम्प्लीमेंटेशन एप्रोच का अन्वेषण कर सकें। + +- [Aspose.BarCode के साथ .NET के लिए डॉटकोड विस्तारित कोडटेक्स्ट कैसे बनाएं](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Aspose .NET में बारकोड बनाएं - DataMatrix कोड टेक्स्ट कॉन्फ़िगर करना](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Aspose.BarCode for .NET का उपयोग करके ITF-14 के लिए बारकोड क्वाइट ज़ोन कैसे बनाएं](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/hongkong/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..08e006c33 --- /dev/null +++ b/barcode/hongkong/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-08-09 +description: 使用 Aspose.BarCode 在 Python 中建立 QR 條碼。了解如何構建擴展代碼文字、調整外觀以及儲存圖像——一次完整教學。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: zh-hant +lastmod: 2026-08-09 +og_description: 使用 Aspose.BarCode 在 Python 中建立 QR 條碼。本指南說明如何構建擴充代碼文字、設定視覺參數,並匯出圖像。 +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: 使用 Aspose.BarCode 在 Python 中建立 QR 條碼 – 完整程式碼範例 +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: 使用 Aspose.BarCode 在 Python 中建立 QR 條碼 – 逐步指南 +url: /zh-hant/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# 使用 Aspose.BarCode 在 Python 中建立 QR 條碼 – 步驟指南 + +如果您需要在 Python 中 **建立 QR 條碼**,本教學將帶您一步步使用 Aspose.BarCode 函式庫完成整個流程。無論是編碼產品編號、多語言文字或自訂資料,您都會看到如何組合延伸的 codetext、調整視覺設定,並在單一可執行腳本中儲存最終影像。 + +範例同時示範如何顯示函式庫版本,協助您確認使用的是相容的發行版。完成本指南後,您將擁有可直接使用的 QR 條碼影像,並清楚了解每個設定選項的作用。 + +## 前置條件 + +在開始之前,請確保您已具備: + +- 已安裝 Python 3.8 以上版本。 +- `aspose-barcode` 套件(可透過 `pip install aspose-barcode` 安裝)。 +- 基本的 Python 語法概念。 +- 對將要儲存 PNG 檔案的輸出目錄具有寫入權限。 + +> **專業小技巧:** 使用虛擬環境可避免與其他專案的版本衝突。 + +## 第一步:驗證 Aspose.BarCode 函式庫版本 + +顯示函式庫版本可確保您使用的發行版支援延伸 codetext 與 QR 編碼。 + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**為什麼這很重要:** +較舊的發行版可能缺少 `ExtCodetextBuilder` 類別,該類別是混合純文字與 ECI 區段所必需的。確認版本可避免在後續流程中發生執行時錯誤。 + +## 第二步:建構延伸 codetext 字串 + +延伸 codetext 讓您可以將純 ASCII 資料與 Unicode(ECI)區段結合,這對於多語言 QR 條碼至關重要。 + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**為什麼這很重要:** +`add_plain_codetext` 方法會以標準 ASCII 儲存資料,而 `add_eci_codetext` 會在 Unicode 區塊前加上相應的 ECI 指示符。此做法確保 QR 掃描器正確解讀日文文字,避免出現亂碼。 + +### 常見變化 + +- **多個 ECI 區段:** 多次呼叫 `add_eci_codetext` 即可混合多種語言。 +- **不同的 ECI 識別碼:** 依目標編碼使用 `27`(ISO‑8859‑1)、`28`(ISO‑8859‑2)等。 + +## 第三步:使用延伸 codetext 產生 QR 條碼 + +現在已有正確格式的字串,我們即可建立 QR Code。 + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**為什麼這很重要:** +`EncodeTypes.QR` 讓 Aspose.BarCode 使用 QR 符號。直接傳入 `extended_codetext` 可將混合資料映射到 QR 矩陣中,保留純文字與 Unicode 部分。 + +## 第四步:調整視覺外觀(可選但建議) + +微調條碼的視覺參數可提升掃描可靠性,並符合品牌指引。 + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**為什麼這很重要:** +- **`x_dimension`** 控制每個 QR 模組的大小;過小可能在低解析度裝置上產生讀取錯誤。 +- **`border_width`** 增加靜區。部分掃描器要求至少 4 個模組的靜區;函式庫會自動加入,但您可自行增大以提升安全性。 + +### 邊緣情況處理 + +- **高密度資料:** 若編碼資料過大,可能需要增大 `x_dimension` 或選擇較高的錯誤更正等級(透過 `qr_generator.parameters.qr.error_correction_level`)。 +- **透明背景:** 設定 `qr_generator.parameters.barcode.bg_color = Color.Transparent` 可為 PNG 產生含 alpha 通道的透明背景。 + +## 第五步:儲存 QR 條碼影像 + +最後,將影像寫入磁碟,使用您偏好的格式。 + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**為什麼這很重要:** +以 PNG 儲存可保留無損品質,對於需要清晰邊緣的 QR 條碼而言是最佳選擇。若您的 Web 應用需要其他格式,只要更改 `BarCodeImageFormat` 列舉即可。 + +### 驗證結果 + +使用任何影像檢視器開啟已儲存的檔案。您應該會看到一個 QR Code,掃描後會回傳結合的字串: + +``` +ABC12345 +こんにちは +``` + +大多數現代 QR 掃描應用會先顯示純文字區段,接著正確呈現日文問候語。 + +--- + +## 完整可執行腳本 + +將下方整段程式碼複製到名為 `create_qr_barcode.py` 的檔案中,並以 `python create_qr_barcode.py` 執行。請將 `YOUR_DIRECTORY` 替換為您機器上可寫入的資料夾路徑。 + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +執行此腳本會列印版本資訊、延伸 codetext,並確認 PNG 檔案已成功建立。 + +--- + +## 結論 + +您現在已掌握如何在 Python 中使用 Aspose.BarCode **建立 QR 條碼** 影像。本教學涵蓋: + +1. 驗證函式庫版本。 +2. 使用純文字與 ECI(Unicode)區段建構延伸 codetext。 +3. 產生 QR Code。 +4. 客製化視覺參數(如模組大小與靜區寬度)。 +5. 以 PNG 格式儲存最終影像。 + +接下來您可以探索: + +- 更改錯誤更正等級(`qr_generator.parameters.qr.error_correction_level`)。 +- 加入商標或背景圖(`qr_generator.parameters.qr.logo`)。 +- 匯出為 SVG 等可縮放的網頁圖形格式。 +- 將產生器整合至 Flask 或 Django 端點,以實現即時 QR 產生。 + +嘗試不同的資料負載與視覺設定,讓您的應用符合品牌形象與掃描需求。祝開發順利! + +## 接下來該學什麼? + +以下教學與本指南緊密相關,能進一步深化您對 API 功能的掌握,並探索在專案中使用的其他實作方式。 + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/hungarian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..3e9a4711f --- /dev/null +++ b/barcode/hungarian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,269 @@ +--- +category: general +date: 2026-08-09 +description: QR vonalkód létrehozása Pythonban az Aspose.BarCode segítségével. Tanulja + meg, hogyan építsen kiterjesztett kódszöveget, állítsa be a megjelenést, és mentse + el a képet – mindezt egyetlen útmutatóban. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: hu +lastmod: 2026-08-09 +og_description: QR vonalkód létrehozása Pythonban az Aspose.BarCode segítségével. + Ez az útmutató bemutatja, hogyan építsünk kiterjesztett kódszöveget, állítsuk be + a vizuális paramétereket, és exportáljuk a képet. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: QR vonalkód létrehozása az Aspose.BarCode segítségével Pythonban – teljes + kódpélda +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: QR vonalkód létrehozása az Aspose.BarCode segítségével Pythonban – lépésről‑lépésre + útmutató +url: /hu/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# QR vonalkód létrehozása az Aspose.BarCode segítségével Pythonban – lépésről‑lépésre útmutató + +Ha **QR vonalkódot** kell létrehoznod Pythonban, ez a tutorial végigvezeti a teljes folyamaton az Aspose.BarCode könyvtár használatával. Akár termékazonosítókat, többnyelvű szöveget vagy egyedi adatot kódolsz, megmutatjuk, hogyan építs fel egy kiterjesztett kódszöveget, állítsd be a vizuális paramétereket, és mentsd el a végleges képet egyetlen, futtatható szkriptben. + +A példa bemutatja, hogyan jelenítheted meg a könyvtár verzióját, ami segít ellenőrizni, hogy kompatibilis kiadást használsz. A útmutató végére egy használatra kész QR vonalkód képet és a konfigurációs lehetőségek világos megértését kapod. + +## Előfeltételek + +Mielőtt elkezdenéd, győződj meg róla, hogy a következők rendelkezésre állnak: + +- Python 3.8+ telepítve. +- Az `aspose-barcode` csomag (telepítés: `pip install aspose-barcode`). +- Alapvető ismeretek a Python szintaxisáról. +- Írási jogosultság a kimeneti könyvtárban, ahová a PNG fájl mentésre kerül. + +> **Pro tipp:** Használj virtuális környezetet a verzióütközések elkerülése érdekében más projektekben. + +## 1. lépés: Az Aspose.BarCode könyvtár verziójának ellenőrzése + +A könyvtár verziójának megjelenítése biztosítja, hogy olyan kiadást használsz, amely támogatja a kiterjesztett kódszöveget és a QR kódolást. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Miért fontos:** +A régebbi kiadások esetleg nem tartalmazzák az `ExtCodetextBuilder` osztályt, amely a vegyes egyszerű és ECI szegmensekhez szükséges. A verzió ellenőrzése megakadályozza a későbbi futásidejű hibákat. + +## 2. lépés: Kiterjesztett kódszöveg (extended codetext) felépítése + +A kiterjesztett kódszöveg lehetővé teszi egyszerű ASCII adatok és Unicode (ECI) szegmensek kombinálását, ami elengedhetetlen a többnyelvű QR kódokhoz. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Miért fontos:** +Az `add_plain_codetext` metódus az adatot szabványos ASCII‑ként tárolja, míg az `add_eci_codetext` egy Unicode blokkot előtagként az adott ECI jelölővel lát el. Ez a megközelítés biztosítja, hogy a QR‑olvasók helyesen értelmezzék a japán szöveget, elkerülve a torz karaktereket. + +### Gyakori variációk + +- **Több ECI szegmens:** Hívd meg az `add_eci_codetext` metódust többször a különböző nyelvek keveréséhez. +- **Eltérő ECI azonosítók:** Használd a `27`‑et az ISO‑8859‑1‑hez, a `28`‑at az ISO‑8859‑2‑höz stb., a célkódolástól függően. + +## 3. lépés: QR vonalkód generálása a kiterjesztett kódszöveggel + +Miután megvan a megfelelően formázott karakterlánc, létrehozhatjuk a QR kódot. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Miért fontos:** +Az `EncodeTypes.QR` azt mondja az Aspose.BarCode‑nak, hogy a QR szimbólumot használja. Az `extended_codetext` közvetlen átadása összekapcsolja a vegyes adatot a QR mátrixszal, megőrizve mind az egyszerű, mind a Unicode részeket. + +## 4. lépés: Vizuális megjelenés finomhangolása (opcionális, de ajánlott) + +A vonalkód vizuális paramétereinek finomhangolása javítja a beolvasási megbízhatóságot és megfelel a márka irányelveinek. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Miért fontos:** +- **`x_dimension`** szabályozza egy QR modul méretét; túl kicsi esetén olvasási hibák léphetnek fel alacsony felbontású eszközökön. +- **`border_width`** egy csendes zónát (quiet zone) ad hozzá. Egyes olvasók legalább 4 modul széles csendes zónát igényelnek; a könyvtár ezt automatikusan hozzáadja, de növelheted a biztonság kedvéért. + +### Szélsőséges esetek kezelése + +- **Nagy sűrűségű adat:** Ha a kódolt adat nagy, növelned kell az `x_dimension` értékét vagy magasabb hibajavító szintet kell választanod (a `qr_generator.parameters.qr.error_correction_level` segítségével). +- **Átlátszó háttér:** Állítsd be a `qr_generator.parameters.barcode.bg_color = Color.Transparent` értéket PNG‑k esetén, ahol alfa csatorna szükséges. + +## 5. lépés: QR vonalkód kép mentése + +Végül írd a képet a lemezre a kívánt formátumban. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Miért fontos:** +A PNG formátum veszteségmentes minőséget biztosít, ami ideális a tiszta élekre szoruló QR kódokhoz. Ha webalkalmazáshoz más formátumra van szükséged, egyszerűen módosítsd a `BarCodeImageFormat` enumerációt. + +### Az eredmény ellenőrzése + +Nyisd meg a mentett fájlt bármely képnézegetőben. Egy QR kódot kell látnod, amely beolvasáskor visszaadja a kombinált karakterláncot: + +``` +ABC12345 +こんにちは +``` + +A legtöbb modern QR‑olvasó alkalmazás először a egyszerű szegmenst jeleníti meg, majd helyesen rendereli a japán üdvözletet. + +--- + +## Teljesen futtatható szkript + +Másold az alábbi blokkot egy `create_qr_barcode.py` nevű fájlba, majd futtasd a `python create_qr_barcode.py` paranccsal. Állítsd be a `YOUR_DIRECTORY`‑t egy írható mappára a gépeden. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +A szkript futtatása kiírja a verziót, a kiterjesztett kódszöveget, és megerősíti, hogy a PNG fájl létrejött. + +--- + +## Összegzés + +Most már tudod, hogyan **hozz létre QR vonalkód képeket** Pythonban az Aspose.BarCode segítségével. A tutorial lefedte: + +1. A könyvtár verziójának ellenőrzését. +2. Kiterjesztett kódszöveg építését egyszerű és ECI (Unicode) szegmensekkel. +3. A QR kód generálását. +4. A vizuális paraméterek testreszabását, például modulméretet és border_width‑et. +5. A végleges kép PNG formátumban történő mentését. + +Innen tovább felfedezheted: + +- Hibajavító szintek módosítása (`qr_generator.parameters.qr.error_correction_level`). +- Logó vagy háttérkép hozzáadása (`qr_generator.parameters.qr.logo`). +- Exportálás más formátumokba, például SVG‑be a skálázható webgrafikához. +- A generátor integrálása Flask vagy Django végpontra a valós‑időben történő QR generáláshoz. + +Kísérletezz különböző adatpayloadokkal és vizuális beállításokkal, hogy megfeleljenek alkalmazásod márkájának és beolvasási követelményeinek. Boldog kódolást! + +## Mi legyen a következő tanulnivalód? + +Az alábbi tutorialok szorosan kapcsolódó témákat fednek le, amelyek a jelen útmutatóban bemutatott technikákra épülnek. Minden forrás komplett, működő kódrészleteket tartalmaz lépésről‑lépésre magyarázatokkal, hogy elsajátíthasd az API további funkcióit és alternatív megvalósítási megközelítéseket a saját projektjeidben. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/indonesian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..087766947 --- /dev/null +++ b/barcode/indonesian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,280 @@ +--- +category: general +date: 2026-08-09 +description: Buat kode QR barcode di Python menggunakan Aspose.BarCode. Pelajari cara + membangun codetext yang diperluas, menyesuaikan tampilan, dan menyimpan gambar—semua + dalam satu tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: id +lastmod: 2026-08-09 +og_description: Buat barcode QR di Python dengan Aspose.BarCode. Panduan ini menunjukkan + cara membuat codetext yang diperluas, mengatur parameter visual, dan mengekspor + gambar. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Buat kode QR dengan Aspose.BarCode di Python – contoh kode lengkap +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Buat kode batang QR dengan Aspose.BarCode di Python – panduan langkah demi + langkah +url: /id/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Buat kode batang QR dengan Aspose.BarCode di Python – panduan langkah demi langkah + +Jika Anda perlu **membuat kode batang QR** di Python, tutorial ini akan memandu Anda melalui seluruh proses menggunakan pustaka Aspose.BarCode. Baik Anda mengkodekan ID produk, teks multibahasa, atau data khusus, Anda akan melihat cara membangun codetext yang diperluas, menyesuaikan pengaturan visual, dan menyimpan gambar akhir dalam satu skrip yang dapat dijalankan. + +Contoh ini juga menunjukkan cara menampilkan versi pustaka, yang membantu Anda memverifikasi bahwa Anda menjalankan rilis yang kompatibel. Pada akhir panduan ini Anda akan memiliki gambar kode batang QR siap pakai dan pemahaman yang jelas tentang setiap opsi konfigurasi. + +## Prerequisites + +Sebelum Anda memulai, pastikan Anda memiliki: + +- Python 3.8+ terpasang. +- Paket `aspose-barcode` (pasang via `pip install aspose-barcode`). +- Familiaritas dasar dengan sintaks Python. +- Izin menulis ke direktori output tempat file PNG akan disimpan. + +> **Pro tip:** Gunakan lingkungan virtual untuk menghindari konflik versi dengan proyek lain. + +## Step 1: Verify the Aspose.BarCode library version + +Menampilkan versi pustaka memastikan Anda menggunakan rilis yang mendukung codetext yang diperluas dan enkoding QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Mengapa ini penting:** +Rilis lama mungkin tidak memiliki kelas `ExtCodetextBuilder` yang diperlukan untuk segmen campuran plain dan ECI. Memastikan versi mencegah kesalahan runtime nanti dalam alur kerja. + +## Step 2: Build an extended codetext string + +Codetext yang diperluas memungkinkan Anda menggabungkan data ASCII biasa dengan segmen Unicode (ECI), yang penting untuk kode QR multibahasa. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Mengapa ini penting:** +Metode `add_plain_codetext` menyimpan data sebagai ASCII standar, sementara `add_eci_codetext` menambahkan awalan blok Unicode dengan penunjuk ECI yang sesuai. Pendekatan ini memastikan pemindai QR menginterpretasikan teks Jepang dengan benar, menghindari karakter yang rusak. + +### Common variations + +Variasi umum + +- **Multiple ECI segments:** Panggil `add_eci_codetext` beberapa kali untuk mencampur beberapa bahasa. +- **Different ECI identifiers:** Gunakan `27` untuk ISO‑8859‑1, `28` untuk ISO‑8859‑2, dll., tergantung pada enkoding target Anda. + +## Step 3: Generate the QR barcode using the extended codetext + +Sekarang kita memiliki string yang diformat dengan benar, kita dapat membuat kode QR. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Mengapa ini penting:** +`EncodeTypes.QR` memberi tahu Aspose.BarCode untuk menggunakan simbol QR. Mengirimkan `extended_codetext` secara langsung menghubungkan data campuran ke matriks QR, mempertahankan bagian plain dan Unicode. + +## Step 4: Adjust visual appearance (optional but recommended) + +Penyetelan halus parameter visual kode batang meningkatkan keandalan pemindaian dan menyesuaikan pedoman merek. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Mengapa ini penting:** +- **`x_dimension`** mengontrol ukuran setiap modul QR; terlalu kecil dapat menyebabkan kesalahan pembacaan pada perangkat beresolusi rendah. +- **`border_width`** menambahkan zona tenang. Beberapa pemindai memerlukan setidaknya zona tenang 4‑modul; pustaka menambahkannya secara otomatis, tetapi Anda dapat meningkatkannya untuk keamanan ekstra. + +### Edge case handling + +Penanganan kasus tepi + +- **Data ber‑densitas tinggi:** Jika data yang dienkode besar, Anda mungkin perlu meningkatkan `x_dimension` atau memilih tingkat koreksi kesalahan yang lebih tinggi (melalui `qr_generator.parameters.qr.error_correction_level`). +- **Latar belakang transparan:** Atur `qr_generator.parameters.barcode.bg_color = Color.Transparent` untuk PNG dengan saluran alfa. + +## Step 5: Save the QR barcode image + +Akhirnya, tulis gambar ke disk dalam format pilihan Anda. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Mengapa ini penting:** +Menyimpan sebagai PNG mempertahankan kualitas lossless, yang ideal untuk kode QR yang memerlukan tepi tajam. Jika Anda memerlukan format lain untuk aplikasi web, cukup ubah enumerasi `BarCodeImageFormat`. + +### Verifying the result + +Memverifikasi hasil + +Buka file yang disimpan di penampil gambar apa pun. Anda harus melihat kode QR yang, ketika dipindai, mengembalikan string gabungan: + +``` +ABC12345 +こんにちは +``` + +Sebagian besar aplikasi pemindai QR modern menampilkan segmen plain terlebih dahulu dan kemudian menampilkan salam Jepang dengan benar. + +--- + +## Full runnable script + +Skrip lengkap yang dapat dijalankan + +Salin seluruh blok di bawah ini ke dalam file bernama `create_qr_barcode.py` dan jalankan dengan `python create_qr_barcode.py`. Sesuaikan `YOUR_DIRECTORY` ke folder yang dapat ditulisi di mesin Anda. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Menjalankan skrip ini akan mencetak versi, codetext yang diperluas, dan konfirmasi bahwa file PNG telah dibuat. + +--- + +## Conclusion + +Kesimpulan + +Anda sekarang tahu cara **membuat gambar kode batang QR** di Python menggunakan Aspose.BarCode. Tutorial ini mencakup: + +1. Memverifikasi versi pustaka. +2. Membangun codetext yang diperluas dengan segmen plain dan ECI (Unicode). +3. Menghasilkan kode QR. +4. Menyesuaikan parameter visual seperti ukuran modul dan lebar batas. +5. Menyimpan gambar akhir dalam format PNG. + +Dari sini Anda dapat menjelajahi: + +- Mengubah tingkat koreksi kesalahan (`qr_generator.parameters.qr.error_correction_level`). +- Menambahkan logo atau gambar latar belakang (`qr_generator.parameters.qr.logo`). +- Mengekspor ke format lain seperti SVG untuk grafik web yang dapat diskalakan. +- Mengintegrasikan generator ke endpoint Flask atau Django untuk pembuatan QR secara langsung. + +Bereksperimenlah dengan payload data dan pengaturan visual yang berbeda untuk menyesuaikan merek serta kebutuhan pemindaian aplikasi Anda. Selamat coding! + +## What Should You Learn Next? + +Apa yang Harus Anda Pelajari Selanjutnya? + +Tutorial berikut mencakup topik terkait yang membangun teknik yang ditunjukkan dalam panduan ini. Setiap sumber 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. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/italian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..b2a040ec4 --- /dev/null +++ b/barcode/italian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Crea un codice QR in Python usando Aspose.BarCode. Scopri come generare + un codetext esteso, regolare l'aspetto e salvare l'immagine—tutto in un unico tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: it +lastmod: 2026-08-09 +og_description: Crea un codice QR in Python con Aspose.BarCode. Questa guida mostra + come costruire un codetext esteso, impostare i parametri visivi e esportare l'immagine. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Crea codice QR con Aspose.BarCode in Python – esempio completo di codice +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Crea codice a barre QR con Aspose.BarCode in Python – guida passo passo +url: /it/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Crea un codice a barre QR con Aspose.BarCode in Python – guida passo‑passo + +Se hai bisogno di **creare un codice a barre QR** in Python, questo tutorial ti guida attraverso l’intero processo usando la libreria Aspose.BarCode. Che tu stia codificando ID prodotto, testo multilingue o dati personalizzati, vedrai come costruire un codetext esteso, regolare le impostazioni visive e salvare l’immagine finale in uno script unico e eseguibile. + +L’esempio mostra anche come visualizzare la versione della libreria, il che ti aiuta a verificare di stare usando una release compatibile. Alla fine di questa guida avrai un’immagine di codice a barre QR pronta all’uso e una chiara comprensione di ogni opzione di configurazione. + +## Prerequisiti + +Prima di iniziare, assicurati di avere: + +- Python 3.8+ installato. +- Il pacchetto `aspose-barcode` (installalo con `pip install aspose-barcode`). +- Familiarità di base con la sintassi di Python. +- Permessi di scrittura nella directory di output dove verrà salvato il file PNG. + +> **Consiglio pro:** Usa un ambiente virtuale per evitare conflitti di versione con altri progetti. + +## Step 1: Verifica la versione della libreria Aspose.BarCode + +Visualizzare la versione della libreria garantisce che tu stia usando una release che supporta il codetext esteso e la codifica QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Perché è importante:** +Le versioni più vecchie potrebbero non includere la classe `ExtCodetextBuilder` necessaria per segmenti misti plain e ECI. Confermare la versione previene errori di runtime più avanti nel flusso di lavoro. + +## Step 2: Costruisci una stringa di codetext esteso + +Un codetext esteso ti consente di combinare dati ASCII plain con segmenti Unicode (ECI), fondamentale per i QR code multilingue. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Perché è importante:** +Il metodo `add_plain_codetext` memorizza i dati come ASCII standard, mentre `add_eci_codetext` antepone a un blocco Unicode il designatore ECI appropriato. Questo approccio assicura che gli scanner QR interpretino correttamente il testo giapponese, evitando caratteri illeggibili. + +### Varianti comuni + +- **Segmenti ECI multipli:** Chiama `add_eci_codetext` più volte per mescolare diverse lingue. +- **Identificatori ECI diversi:** Usa `27` per ISO‑8859‑1, `28` per ISO‑8859‑2, ecc., a seconda della codifica di destinazione. + +## Step 3: Genera il codice a barre QR usando il codetext esteso + +Ora che abbiamo una stringa formattata correttamente, possiamo creare il QR code. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Perché è importante:** +`EncodeTypes.QR` indica ad Aspose.BarCode di utilizzare la simbologia QR. Passare direttamente `extended_codetext` collega i dati misti alla matrice QR, preservando sia le parti plain sia quelle Unicode. + +## Step 4: Regola l’aspetto visivo (opzionale ma consigliato) + +Affinare i parametri visivi del codice a barre migliora l’affidabilità della scansione e si allinea alle linee guida del brand. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Perché è importante:** +- **`x_dimension`** controlla la dimensione di ogni modulo QR; valori troppo piccoli possono causare errori di lettura su dispositivi a bassa risoluzione. +- **`border_width`** aggiunge una zona silenziosa. Alcuni scanner richiedono almeno una zona silenziosa di 4 moduli; la libreria la aggiunge automaticamente, ma puoi aumentarla per maggiore sicurezza. + +### Gestione dei casi limite + +- **Dati ad alta densità:** Se i dati codificati sono molti, potresti dover aumentare `x_dimension` o scegliere un livello di correzione d’errore più alto (tramite `qr_generator.parameters.qr.error_correction_level`). +- **Sfondo trasparente:** Imposta `qr_generator.parameters.barcode.bg_color = Color.Transparent` per PNG con canale alfa. + +## Step 5: Salva l’immagine del codice a barre QR + +Infine, scrivi l’immagine su disco nel formato che preferisci. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Perché è importante:** +Salvare come PNG mantiene una qualità lossless, ideale per i QR code che richiedono bordi nitidi. Se ti serve un formato diverso per un’app web, basta cambiare l’enumerazione `BarCodeImageFormat`. + +### Verifica del risultato + +Apri il file salvato con qualsiasi visualizzatore di immagini. Dovresti vedere un QR code che, una volta scansionato, restituisce la stringa combinata: + +``` +ABC12345 +こんにちは +``` + +La maggior parte delle app scanner moderne mostra prima il segmento plain e poi rende correttamente il saluto giapponese. + +--- + +## Script completo eseguibile + +Copia l’intero blocco qui sotto in un file chiamato `create_qr_barcode.py` ed eseguilo con `python create_qr_barcode.py`. Modifica `YOUR_DIRECTORY` con una cartella scrivibile sul tuo computer. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +L’esecuzione di questo script stampa la versione, il codetext esteso e una conferma che il file PNG è stato creato. + +--- + +## Conclusione + +Ora sai come **creare un codice a barre QR** in Python usando Aspose.BarCode. Il tutorial ha coperto: + +1. Verifica della versione della libreria. +2. Costruzione del codetext esteso con segmenti plain ed ECI (Unicode). +3. Generazione del QR code. +4. Personalizzazione dei parametri visivi come dimensione del modulo e larghezza del bordo. +5. Salvataggio dell’immagine finale in formato PNG. + +Da qui puoi approfondire: + +- Modificare i livelli di correzione d’errore (`qr_generator.parameters.qr.error_correction_level`). +- Aggiungere un logo o un’immagine di sfondo (`qr_generator.parameters.qr.logo`). +- Esportare in altri formati come SVG per grafica web scalabile. +- Integrare il generatore in un endpoint Flask o Django per la creazione di QR al volo. + +Sperimenta con payload di dati diversi e impostazioni visive per adattarle al branding e ai requisiti di scansione della tua applicazione. Buon coding! + +## Cosa dovresti imparare dopo? + +I tutorial seguenti trattano 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à aggiuntive dell’API e a esplorare approcci alternativi di implementazione nei tuoi progetti. + +- [Come creare codetext esteso per dotcode con Aspose.BarCode per .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Creare barcode Aspose .NET – Configurazione del testo DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Come creare una zona silenziosa per ITF-14 usando Aspose.BarCode per .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/japanese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..3cb81ad5f --- /dev/null +++ b/barcode/japanese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,261 @@ +--- +category: general +date: 2026-08-09 +description: Aspose.BarCode を使用して Python で QR バーコードを作成します。拡張コードテキストの構築方法、外観の調整、画像の保存方法をすべて一つのチュートリアルで学びましょう。 +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: ja +lastmod: 2026-08-09 +og_description: Aspose.BarCode を使用して Python で QR バーコードを作成します。このガイドでは、拡張コードテキストの構築、視覚パラメータの設定、画像のエクスポート方法を示します。 +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: PythonでAspose.BarCodeを使用してQRバーコードを作成する – 完全コード例 +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: PythonでAspose.BarCodeを使ってQRバーコードを作成する – ステップバイステップガイド +url: /ja/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# PythonでAspose.BarCodeを使用してQRバーコードを作成する – ステップバイステップガイド + +Pythonで**QRバーコードを作成**する必要がある場合、このチュートリアルではAspose.BarCodeライブラリを使用した全プロセスを順を追って説明します。製品ID、多言語テキスト、カスタムデータのエンコードなど、拡張コードテキストの構築、ビジュアル設定の調整、最終画像の保存を単一の実行可能スクリプトで行う方法が分かります。 + +この例ではライブラリのバージョン表示方法も示しており、互換性のあるリリースを使用しているか確認できます。このガイドの最後までに、すぐに使用できるQRバーコード画像と各設定オプションの明確な理解が得られます。 + +## 前提条件 + +- Python 3.8+ がインストールされていること。 +- `aspose-barcode` パッケージ(`pip install aspose-barcode` でインストール)。 +- Python構文の基本的な知識があること。 +- PNGファイルを保存する出力ディレクトリへの書き込み権限があること。 + +> **プロのコツ:** 仮想環境を使用して、他のプロジェクトとのバージョン競合を回避しましょう。 + +## 手順 1: Aspose.BarCode ライブラリのバージョンを確認する + +ライブラリのバージョンを表示することで、拡張コードテキストとQRエンコードをサポートするリリースを使用していることが確認できます。 + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**なぜ重要か:** +古いリリースには、プレーンとECIセグメントの混在に必要な `ExtCodetextBuilder` クラスが含まれていない場合があります。バージョンを確認することで、後のワークフローでのランタイムエラーを防止できます。 + +## 手順 2: 拡張コードテキスト文字列を構築する + +拡張コードテキストを使用すると、プレーンなASCIIデータとUnicode(ECI)セグメントを組み合わせることができ、マルチリンガルQRコードに必須です。 + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**なぜ重要か:** +`add_plain_codetext` メソッドはデータを標準ASCIIとして保存し、`add_eci_codetext` は適切なECI識別子を付けてUnicodeブロックを前置します。このアプローチにより、QRスキャナーは日本語テキストを正しく解釈し、文字化けを防止します。 + +### 一般的なバリエーション + +- **複数のECIセグメント:** `add_eci_codetext` を複数回呼び出して複数言語を混在させます。 +- **異なるECI識別子:** ターゲットのエンコーディングに応じて、`27` を ISO‑8859‑1、`28` を ISO‑8859‑2 などに使用します。 + +## 手順 3: 拡張コードテキストを使用してQRバーコードを生成する + +適切にフォーマットされた文字列が用意できたので、QRコードを作成できます。 + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**なぜ重要か:** +`EncodeTypes.QR` はAspose.BarCodeにQRシンボルを使用させます。`extended_codetext` を直接渡すことで、混在データがQRマトリックスに結び付けられ、プレーン部分とUnicode部分の両方が保持されます。 + +## 手順 4: ビジュアル外観を調整する(任意だが推奨) + +バーコードのビジュアルパラメータを微調整することで、スキャンの信頼性が向上し、ブランドガイドラインに合わせることができます。 + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**なぜ重要か:** +- **`x_dimension`** は各QRモジュールのサイズを制御します。小さすぎると低解像度デバイスで読み取りエラーが発生する可能性があります。 +- **`border_width`** はクワイエットゾーン(余白)を追加します。一部のスキャナーは最低でも4モジュールのクワイエットゾーンを必要とします。ライブラリは自動で追加しますが、さらなる安全のために増やすこともできます。 + +### エッジケースの処理 + +- **高密度データ:** エンコードするデータが大きい場合、`x_dimension` を増やすか、より高いエラーレベル(`qr_generator.parameters.qr.error_correction_level` 経由)を選択する必要があります。 +- **透過背景:** アルファチャンネル付きPNGの場合、`qr_generator.parameters.barcode.bg_color = Color.Transparent` を設定します。 + +## 手順 5: QRバーコード画像を保存する + +最後に、画像を好みの形式でディスクに書き込みます。 + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**なぜ重要か:** +PNGで保存するとロスレス品質が保たれ、鮮明なエッジが必要なQRコードに最適です。Webアプリケーションで別の形式が必要な場合は、`BarCodeImageFormat` 列挙体を変更するだけです。 + +### 結果の検証 + +任意の画像ビューアで保存されたファイルを開きます。スキャンすると結合された文字列が返されるQRコードが表示されるはずです: + +``` +ABC12345 +こんにちは +``` + +ほとんどの最新QRスキャナーアプリはプレーンセグメントを先に表示し、続いて日本語の挨拶を正しくレンダリングします。 + +--- + +## 完全に実行可能なスクリプト + +以下のブロック全体を `create_qr_barcode.py` という名前のファイルにコピーし、`python create_qr_barcode.py` で実行してください。`YOUR_DIRECTORY` をマシン上の書き込み可能なフォルダーに変更します。 + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +このスクリプトを実行すると、バージョン、拡張コードテキストが表示され、PNGファイルが作成されたことが確認できます。 + +--- + +## 結論 + +これで、PythonでAspose.BarCodeを使用して**QRバーコード**画像を作成する方法が分かりました。このチュートリアルでは以下をカバーしました: + +1. ライブラリのバージョンを確認する。 +2. プレーンとECI(Unicode)セグメントを組み合わせた拡張コードテキストを構築する。 +3. QRコードを生成する。 +4. モジュールサイズやボーダー幅などのビジュアルパラメータをカスタマイズする。 +5. 最終画像をPNG形式で保存する。 + +ここからは以下を検討できます: + +- エラーレベルを変更する(`qr_generator.parameters.qr.error_correction_level`)。 +- ロゴや背景画像を追加する(`qr_generator.parameters.qr.logo`)。 +- SVGなどの他形式へエクスポートして、スケーラブルなウェブグラフィックにする。 +- FlaskやDjangoのエンドポイントに統合し、オンザフライでQRを生成する。 + +さまざまなデータペイロードやビジュアル設定を試して、アプリケーションのブランドやスキャン要件に合わせてください。コーディングを楽しんで! + +## 次に学ぶべきことは? + +以下のチュートリアルは、本ガイドで示した手法を基にした密接に関連するトピックを取り上げています。各リソースには、完全な動作コード例とステップバイステップの解説が含まれており、追加のAPI機能を習得し、プロジェクトで代替実装アプローチを検討するのに役立ちます。 + +- [Aspose.BarCode for .NETでdotcode拡張コードテキストを作成する方法](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Aspose .NETでDataMatrixコードテキストを設定してバーコードを作成する](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Aspose.BarCode for .NETでITF-14のバーコードクワイエットゾーンを作成する方法](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/korean/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..81c403e2c --- /dev/null +++ b/barcode/korean/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Aspose.BarCode를 사용하여 Python에서 QR 바코드를 생성합니다. 확장된 코드텍스트를 만드는 방법, 외관을 조정하는 + 방법, 이미지를 저장하는 방법을 모두 한 튜토리얼에서 배워보세요. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: ko +lastmod: 2026-08-09 +og_description: Aspose.BarCode를 사용하여 Python에서 QR 바코드를 생성합니다. 이 가이드는 확장된 코드텍스트를 만들고, + 시각적 매개변수를 설정하며, 이미지를 내보내는 방법을 보여줍니다. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Python에서 Aspose.BarCode로 QR 바코드 생성 – 전체 코드 예제 +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Python에서 Aspose.BarCode로 QR 바코드 만들기 – 단계별 가이드 +url: /ko/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Python에서 Aspose.BarCode를 사용해 QR 바코드 만들기 – 단계별 가이드 + +Python에서 **QR 바코드**를 생성해야 할 때, 이 튜토리얼은 Aspose.BarCode 라이브러리를 이용한 전체 과정을 안내합니다. 제품 ID, 다국어 텍스트, 맞춤 데이터 등을 인코딩하는 방법을 확인하고, 확장된 코드텍스트를 구성하고, 시각 설정을 조정하며, 최종 이미지를 단일 실행 가능한 스크립트로 저장하는 방법을 배웁니다. + +예제에서는 라이브러리 버전을 표시하는 방법도 보여주며, 이를 통해 호환 가능한 릴리스를 사용하고 있는지 확인할 수 있습니다. 이 가이드를 마치면 바로 사용할 수 있는 QR 바코드 이미지와 각 설정 옵션에 대한 명확한 이해를 얻을 수 있습니다. + +## 사전 요구 사항 + +시작하기 전에 다음을 확인하세요: + +- Python 3.8+ 설치 +- `aspose-barcode` 패키지 (`pip install aspose-barcode` 로 설치) +- Python 문법에 대한 기본 지식 +- PNG 파일이 저장될 출력 디렉터리에 대한 쓰기 권한 + +> **팁:** 다른 프로젝트와의 버전 충돌을 피하려면 가상 환경을 사용하는 것이 좋습니다. + +## 1단계: Aspose.BarCode 라이브러리 버전 확인 + +라이브러리 버전을 표시하면 확장된 코드텍스트와 QR 인코딩을 지원하는 릴리스를 사용하고 있는지 확인할 수 있습니다. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**이것이 중요한 이유:** +이전 릴리스에서는 혼합된 일반 텍스트와 ECI 세그먼트를 위한 `ExtCodetextBuilder` 클래스를 제공하지 않을 수 있습니다. 버전을 확인하면 이후 워크플로에서 런타임 오류를 방지할 수 있습니다. + +## 2단계: 확장된 코드텍스트 문자열 만들기 + +확장된 코드텍스트를 사용하면 일반 ASCII 데이터와 유니코드(ECI) 세그먼트를 결합할 수 있어 다국어 QR 코드에 필수적입니다. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**이것이 중요한 이유:** +`add_plain_codetext` 메서드는 데이터를 표준 ASCII로 저장하고, `add_eci_codetext`는 적절한 ECI 지정자를 앞에 붙여 유니코드 블록을 추가합니다. 이 방식은 QR 스캐너가 일본어 텍스트를 올바르게 해석하도록 하여 깨진 문자를 방지합니다. + +### 일반적인 변형 + +- **다중 ECI 세그먼트:** 여러 언어를 혼합하려면 `add_eci_codetext`를 여러 번 호출합니다. +- **다른 ECI 식별자:** 대상 인코딩에 따라 `27`(ISO‑8859‑1), `28`(ISO‑8859‑2) 등을 사용합니다. + +## 3단계: 확장된 코드텍스트로 QR 바코드 생성 + +올바르게 포맷된 문자열이 준비되었으니 QR 코드를 만들 수 있습니다. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**이것이 중요한 이유:** +`EncodeTypes.QR`은 Aspose.BarCode에 QR 심볼을 사용하도록 지시합니다. `extended_codetext`를 직접 전달하면 혼합된 데이터가 QR 매트릭스에 연결되어 일반 부분과 유니코드 부분이 모두 보존됩니다. + +## 4단계: 시각적 외관 조정 (선택 사항이지만 권장) + +바코드의 시각적 파라미터를 미세 조정하면 스캔 신뢰성이 향상되고 브랜드 가이드라인에 맞출 수 있습니다. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**이것이 중요한 이유:** +- **`x_dimension`** 은 각 QR 모듈의 크기를 제어합니다. 너무 작으면 저해상도 장치에서 읽기 오류가 발생할 수 있습니다. +- **`border_width`** 는 여백(quiet zone)을 추가합니다. 일부 스캐너는 최소 4모듈 여백을 요구하는데, 라이브러리가 자동으로 추가하지만 안전을 위해 늘릴 수 있습니다. + +### 경계 상황 처리 + +- **고밀도 데이터:** 인코딩 데이터가 큰 경우 `x_dimension`을 늘리거나 `qr_generator.parameters.qr.error_correction_level`을 통해 더 높은 오류 정정 레벨을 선택해야 할 수 있습니다. +- **투명 배경:** PNG에 알파 채널이 필요하면 `qr_generator.parameters.barcode.bg_color = Color.Transparent` 로 설정합니다. + +## 5단계: QR 바코드 이미지 저장 + +마지막으로 선호하는 형식으로 디스크에 이미지를 저장합니다. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**이것이 중요한 이유:** +PNG로 저장하면 손실 없는 품질을 유지할 수 있어 선명한 가장자리가 필요한 QR 코드에 이상적입니다. 웹 애플리케이션에 다른 형식이 필요하면 `BarCodeImageFormat` 열거형을 변경하면 됩니다. + +### 결과 확인 + +이미지 뷰어로 저장된 파일을 열어보세요. 스캔하면 결합된 문자열이 반환됩니다: + +``` +ABC12345 +こんにちは +``` + +대부분의 최신 QR 스캐너 앱은 일반 세그먼트를 먼저 표시하고, 이어서 일본어 인사말을 올바르게 렌더링합니다. + +--- + +## 전체 실행 가능한 스크립트 + +아래 전체 블록을 `create_qr_barcode.py` 라는 파일에 복사하고 `python create_qr_barcode.py` 로 실행하세요. `YOUR_DIRECTORY` 를 머신에서 쓰기 가능한 폴더로 변경하십시오. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +이 스크립트를 실행하면 버전, 확장된 코드텍스트, PNG 파일 생성 확인 메시지가 출력됩니다. + +--- + +## 결론 + +이제 Python에서 Aspose.BarCode를 사용해 **QR 바코드** 이미지를 만드는 방법을 알게 되었습니다. 이번 튜토리얼에서는 다음을 다루었습니다: + +1. 라이브러리 버전 확인 +2. 일반 텍스트와 ECI(유니코드) 세그먼트를 포함한 확장 코드텍스트 구축 +3. QR 코드 생성 +4. 모듈 크기와 여백 너비 같은 시각 파라미터 맞춤 +5. PNG 형식으로 최종 이미지 저장 + +다음 단계로 탐색할 내용: + +- 오류 정정 레벨 변경 (`qr_generator.parameters.qr.error_correction_level`) +- 로고 또는 배경 이미지 추가 (`qr_generator.parameters.qr.logo`) +- SVG와 같은 다른 포맷으로 내보내기(확장 가능한 웹 그래픽) +- Flask 또는 Django 엔드포인트에 통합해 실시간 QR 생성 구현 + +다양한 데이터 페이로드와 시각 설정을 실험해 애플리케이션의 브랜드와 스캔 요구 사항에 맞추세요. 즐거운 코딩 되세요! + +## 다음에 배워야 할 내용 + +다음 튜토리얼들은 이 가이드에서 다룬 기술을 기반으로 하며, 추가 API 기능을 마스터하고 프로젝트에 다양한 구현 방식을 적용하는 데 도움이 됩니다. + +- [Aspose.BarCode for .NET에서 dotcode 확장 코드텍스트 만들기](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Aspose.BarCode for .NET에서 DataMatrix 코드 텍스트 구성](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Aspose.BarCode for .NET에서 ITF-14 바코드 Quiet Zone 설정](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/polish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..435cd154d --- /dev/null +++ b/barcode/polish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-08-09 +description: Utwórz kod QR w Pythonie przy użyciu Aspose.BarCode. Dowiedz się, jak + zbudować rozszerzony tekst kodu, dostosować wygląd i zapisać obraz — wszystko w + jednym samouczku. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: pl +lastmod: 2026-08-09 +og_description: Utwórz kod QR w Pythonie z Aspose.BarCode. Ten przewodnik pokazuje, + jak zbudować rozszerzony tekst kodu, ustawić parametry wizualne i wyeksportować + obraz. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Utwórz kod QR przy użyciu Aspose.BarCode w Pythonie – pełny przykład kodu +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Tworzenie kodu QR przy użyciu Aspose.BarCode w Pythonie – przewodnik krok po + kroku +url: /pl/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Utwórz kod QR przy użyciu Aspose.BarCode w Pythonie – przewodnik krok po kroku + +Jeśli potrzebujesz **utworzyć kod QR** w Pythonie, ten samouczek przeprowadzi Cię przez cały proces przy użyciu biblioteki Aspose.BarCode. Niezależnie od tego, czy kodujesz identyfikatory produktów, tekst wielojęzyczny, czy własne dane, zobaczysz, jak zbudować rozszerzony codetext, dostosować ustawienia wizualne i zapisać końcowy obraz w jednym, uruchamialnym skrypcie. + +Przykład pokazuje również, jak wyświetlić wersję biblioteki, co pomaga zweryfikować, że używasz kompatybilnej wersji. Po zakończeniu tego przewodnika będziesz mieć gotowy do użycia obraz kodu QR oraz jasne zrozumienie każdej opcji konfiguracji. + +## Wymagania wstępne + +- Zainstalowany Python 3.8+. +- Pakiet `aspose-barcode` (zainstaluj za pomocą `pip install aspose-barcode`). +- Podstawowa znajomość składni Pythona. +- Uprawnienia zapisu do katalogu wyjściowego, w którym zostanie zapisany plik PNG. + +> **Wskazówka:** Używaj wirtualnego środowiska, aby uniknąć konfliktów wersji z innymi projektami. + +## Krok 1: Zweryfikuj wersję biblioteki Aspose.BarCode + +Wyświetlenie wersji biblioteki zapewnia, że używasz wydania obsługującego rozszerzony codetext i kodowanie QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Dlaczego to ważne:** +Starsze wydania mogą nie zawierać klasy `ExtCodetextBuilder` wymaganej do mieszania segmentów zwykłych i ECI. Potwierdzenie wersji zapobiega błędom w czasie wykonywania w dalszej części przepływu. + +## Krok 2: Zbuduj rozszerzony ciąg codetext + +Rozszerzony codetext pozwala połączyć zwykłe dane ASCII z segmentami Unicode (ECI), co jest niezbędne dla wielojęzycznych kodów QR. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Dlaczego to ważne:** +Metoda `add_plain_codetext` zapisuje dane jako standardowy ASCII, natomiast `add_eci_codetext` poprzedza blok Unicode odpowiednim identyfikatorem ECI. Takie podejście zapewnia, że skanery QR prawidłowo interpretują japoński tekst, unikając zniekształconych znaków. + +### Typowe warianty + +- **Wiele segmentów ECI:** Wywołaj `add_eci_codetext` wielokrotnie, aby połączyć kilka języków. +- **Różne identyfikatory ECI:** Użyj `27` dla ISO‑8859‑1, `28` dla ISO‑8859‑2 itd., w zależności od docelowego kodowania. + +## Krok 3: Wygeneruj kod QR przy użyciu rozszerzonego codetext + +Teraz, gdy mamy prawidłowo sformatowany ciąg, możemy utworzyć kod QR. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Dlaczego to ważne:** +`EncodeTypes.QR` informuje Aspose.BarCode, aby użył symbologii QR. Przekazanie `extended_codetext` bezpośrednio łączy mieszane dane z macierzą QR, zachowując zarówno część zwykłą, jak i Unicode. + +## Krok 4: Dostosuj wygląd wizualny (opcjonalnie, ale zalecane) + +Dostrajanie parametrów wizualnych kodu kreskowego poprawia niezawodność skanowania i dopasowuje się do wytycznych brandingowych. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Dlaczego to ważne:** +- **`x_dimension`** kontroluje rozmiar każdego modułu QR; zbyt mały może powodować błędy odczytu na urządzeniach o niskiej rozdzielczości. +- **`border_width`** dodaje strefę ciszy. Niektóre skanery wymagają co najmniej 4‑modułowej strefy ciszy; biblioteka dodaje ją automatycznie, ale możesz zwiększyć ją dla dodatkowego bezpieczeństwa. + +### Obsługa przypadków brzegowych + +- **Dane o wysokiej gęstości:** Jeśli zakodowane dane są duże, może być konieczne zwiększenie `x_dimension` lub wybranie wyższego poziomu korekcji błędów (poprzez `qr_generator.parameters.qr.error_correction_level`). +- **Przezroczyste tło:** Ustaw `qr_generator.parameters.barcode.bg_color = Color.Transparent` dla PNG z kanałami alfa. + +## Krok 5: Zapisz obraz kodu QR + +Na koniec zapisz obraz na dysku w wybranym formacie. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Dlaczego to ważne:** +Zapis jako PNG zachowuje jakość bezstratną, co jest idealne dla kodów QR wymagających wyraźnych krawędzi. Jeśli potrzebujesz innego formatu dla aplikacji internetowej, po prostu zmień wyliczenie `BarCodeImageFormat`. + +### Weryfikacja wyniku + +Otwórz zapisany plik w dowolnym przeglądarce obrazów. Powinieneś zobaczyć kod QR, który po zeskanowaniu zwraca połączony ciąg: + +``` +ABC12345 +こんにちは +``` + +Większość nowoczesnych aplikacji skanujących QR wyświetla najpierw segment zwykły, a następnie prawidłowo renderuje japońskie powitanie. + +--- + +## Pełny skrypt do uruchomienia + +Skopiuj cały blok poniżej do pliku o nazwie `create_qr_barcode.py` i uruchom go poleceniem `python create_qr_barcode.py`. Dostosuj `YOUR_DIRECTORY` do zapisywalnego folderu na swoim komputerze. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Uruchomienie tego skryptu wypisuje wersję, rozszerzony codetext oraz potwierdzenie, że plik PNG został utworzony. + +--- + +## Zakończenie + +Teraz wiesz, jak **utworzyć obrazy kodu QR** w Pythonie przy użyciu Aspose.BarCode. Samouczek obejmował: + +1. Weryfikację wersji biblioteki. +2. Budowanie rozszerzonego codetextu z segmentami zwykłymi i ECI (Unicode). +3. Generowanie kodu QR. +4. Dostosowywanie parametrów wizualnych, takich jak rozmiar modułu i szerokość obramowania. +5. Zapis końcowego obrazu w formacie PNG. + +Od tego miejsca możesz eksplorować: + +- Zmianę poziomów korekcji błędów (`qr_generator.parameters.qr.error_correction_level`). +- Dodawanie logo lub obrazu tła (`qr_generator.parameters.qr.logo`). +- Eksport do innych formatów, takich jak SVG, dla skalowalnej grafiki internetowej. +- Integrację generatora z endpointem Flask lub Django w celu tworzenia kodów QR w locie. + +Eksperymentuj z różnymi ładunkami danych i ustawieniami wizualnymi, aby dopasować je do brandingu i wymagań skanowania Twojej aplikacji. Szczęśliwego kodowania! + +## Co powinieneś nauczyć się dalej? + +Poniższe samouczki obejmują ściśle powiązane tematy, które rozwijają techniki przedstawione w tym przewodniku. Każdy zasób 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 utworzyć rozszerzony codetext dotcode przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Utwórz kod kreskowy Aspose .NET – konfigurowanie tekstu DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Jak utworzyć strefę ciszy kodu kreskowego dla ITF-14 przy użyciu Aspose.BarCode dla .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/portuguese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..55d0a4b6a --- /dev/null +++ b/barcode/portuguese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,267 @@ +--- +category: general +date: 2026-08-09 +description: Crie código de barras QR em Python usando Aspose.BarCode. Aprenda como + construir texto de código estendido, ajustar a aparência e salvar a imagem — tudo + em um único tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: pt +lastmod: 2026-08-09 +og_description: Crie código de barras QR em Python com Aspose.BarCode. Este guia mostra + como construir um codetexto estendido, definir parâmetros visuais e exportar a imagem. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Criar código de barras QR com Aspose.BarCode em Python – exemplo completo + de código +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Criar código de barras QR com Aspose.BarCode em Python – guia passo a passo +url: /pt/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Crie código de barras QR com Aspose.BarCode em Python – guia passo a passo + +Se você precisa **criar código de barras QR** em Python, este tutorial o conduz por todo o processo usando a biblioteca Aspose.BarCode. Seja codificando IDs de produtos, texto multilíngue ou dados personalizados, você verá como montar um codetext estendido, ajustar configurações visuais e salvar a imagem final em um único script executável. + +O exemplo também demonstra como exibir a versão da biblioteca, o que ajuda a verificar se você está usando uma versão compatível. Ao final deste guia você terá uma imagem de código de barras QR pronta para uso e uma compreensão clara de cada opção de configuração. + +## Pré‑requisitos + +Antes de começar, certifique‑se de que você tem: + +- Python 3.8+ instalado. +- O pacote `aspose-barcode` (instale via `pip install aspose-barcode`). +- Familiaridade básica com a sintaxe Python. +- Permissão de escrita no diretório de saída onde o arquivo PNG será salvo. + +> **Dica profissional:** Use um ambiente virtual para evitar conflitos de versão com outros projetos. + +## Etapa 1: Verificar a versão da biblioteca Aspose.BarCode + +Exibir a versão da biblioteca garante que você está usando uma versão que suporta codetext estendido e codificação QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Por que isso importa:** +Versões mais antigas podem não conter a classe `ExtCodetextBuilder` necessária para segmentos mistos de texto simples e ECI. Confirmar a versão evita erros em tempo de execução mais adiante no fluxo de trabalho. + +## Etapa 2: Construir uma string de codetext estendido + +Um codetext estendido permite combinar dados ASCII simples com segmentos Unicode (ECI), o que é essencial para códigos QR multilíngues. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Por que isso importa:** +O método `add_plain_codetext` armazena os dados como ASCII padrão, enquanto `add_eci_codetext` prefixa um bloco Unicode com o designador ECI apropriado. Essa abordagem garante que os scanners QR interpretem o texto em japonês corretamente, evitando caracteres corrompidos. + +### Variações comuns + +- **Múltiplos segmentos ECI:** Chame `add_eci_codetext` várias vezes para misturar vários idiomas. +- **Identificadores ECI diferentes:** Use `27` para ISO‑8859‑1, `28` para ISO‑8859‑2, etc., dependendo da codificação alvo. + +## Etapa 3: Gerar o código de barras QR usando o codetext estendido + +Agora que temos uma string formatada corretamente, podemos criar o código QR. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Por que isso importa:** +`EncodeTypes.QR` indica ao Aspose.BarCode que deve usar a simbologia QR. Passar o `extended_codetext` diretamente vincula os dados mistos à matriz QR, preservando tanto as partes simples quanto as Unicode. + +## Etapa 4: Ajustar a aparência visual (opcional, mas recomendado) + +Ajustar finamente os parâmetros visuais do código de barras melhora a confiabilidade da leitura e adequa‑se às diretrizes de branding. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Por que isso importa:** +- **`x_dimension`** controla o tamanho de cada módulo QR; muito pequeno pode causar erros de leitura em dispositivos de baixa resolução. +- **`border_width`** adiciona uma zona silenciosa. Alguns scanners exigem ao menos uma zona silenciosa de 4 módulos; a biblioteca adiciona isso automaticamente, mas você pode aumentá‑la para maior segurança. + +### Tratamento de casos extremos + +- **Dados de alta densidade:** Se os dados codificados forem extensos, pode ser necessário aumentar `x_dimension` ou escolher um nível de correção de erro maior (via `qr_generator.parameters.qr.error_correction_level`). +- **Fundo transparente:** Defina `qr_generator.parameters.barcode.bg_color = Color.Transparent` para PNGs com canal alfa. + +## Etapa 5: Salvar a imagem do código de barras QR + +Por fim, grave a imagem no disco no formato desejado. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Por que isso importa:** +Salvar como PNG preserva qualidade sem perdas, o que é ideal para códigos QR que precisam de bordas nítidas. Se precisar de outro formato para uma aplicação web, basta alterar a enumeração `BarCodeImageFormat`. + +### Verificando o resultado + +Abra o arquivo salvo em qualquer visualizador de imagens. Você deverá ver um código QR que, ao ser escaneado, retorna a string combinada: + +``` +ABC12345 +こんにちは +``` + +A maioria dos aplicativos modernos de leitura de QR exibe primeiro o segmento simples e depois renderiza a saudação em japonês corretamente. + +--- + +## Script completo executável + +Copie todo o bloco abaixo para um arquivo chamado `create_qr_barcode.py` e execute-o com `python create_qr_barcode.py`. Ajuste `YOUR_DIRECTORY` para uma pasta gravável em sua máquina. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Executar este script imprime a versão, o codetext estendido e uma confirmação de que o arquivo PNG foi criado. + +--- + +## Conclusão + +Agora você sabe como **criar imagens de código de barras QR** em Python usando Aspose.BarCode. O tutorial abordou: + +1. Verificar a versão da biblioteca. +2. Construir codetext estendido com segmentos simples e ECI (Unicode). +3. Gerar o código QR. +4. Personalizar parâmetros visuais como tamanho do módulo e largura da borda. +5. Salvar a imagem final em formato PNG. + +A partir daqui, você pode explorar: + +- Alterar níveis de correção de erro (`qr_generator.parameters.qr.error_correction_level`). +- Adicionar um logotipo ou imagem de fundo (`qr_generator.parameters.qr.logo`). +- Exportar para outros formatos como SVG para gráficos web escaláveis. +- Integrar o gerador em um endpoint Flask ou Django para criação de QR sob demanda. + +Experimente diferentes cargas de dados e configurações visuais para adequar‑se ao branding e aos requisitos de leitura da sua aplicação. Boa codificação! + +## 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 explicações passo a passo para ajudá‑lo a dominar recursos adicionais da API e explorar abordagens alternativas em seus próprios projetos. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/russian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..12cc48b75 --- /dev/null +++ b/barcode/russian/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Создайте QR‑штрихкод на Python с помощью Aspose.BarCode. Узнайте, как + построить расширенный код текста, настроить внешний вид и сохранить изображение — + всё в одном руководстве. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: ru +lastmod: 2026-08-09 +og_description: Создайте QR‑код в Python с помощью Aspose.BarCode. Это руководство + показывает, как построить расширенный код текста, задать визуальные параметры и + экспортировать изображение. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Создайте QR‑штрихкод с Aspose.BarCode в Python — полный пример кода +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Создание QR‑кода с Aspose.BarCode в Python — пошаговое руководство +url: /ru/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Создание QR‑штрихкода с Aspose.BarCode в Python – пошаговое руководство + +Если вам нужно **создать QR‑штрихкод** в Python, этот учебник проведет вас через весь процесс с использованием библиотеки Aspose.BarCode. Независимо от того, кодируете ли вы идентификаторы продуктов, многоязычный текст или пользовательские данные, вы увидите, как построить расширенный codetext, настроить визуальные параметры и сохранить окончательное изображение в одном исполняемом скрипте. + +Пример также демонстрирует, как вывести версию библиотеки, что помогает убедиться, что вы используете совместимый релиз. К концу этого руководства у вас будет готовое изображение QR‑штрихкода и чёткое понимание каждой опции конфигурации. + +## Предварительные требования + +- Установлен Python 3.8+. +- Пакет `aspose-barcode` (установить через `pip install aspose-barcode`). +- Базовое знакомство с синтаксисом Python. +- Права записи в каталог вывода, где будет сохранён файл PNG. + +> **Совет:** Используйте виртуальное окружение, чтобы избежать конфликтов версий с другими проектами. + +## Шаг 1: Проверка версии библиотеки Aspose.BarCode + +Отображение версии библиотеки гарантирует, что вы используете релиз, поддерживающий расширенный codetext и кодирование QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Почему это важно:** +Старые релизы могут не содержать класс `ExtCodetextBuilder`, необходимый для смешанных обычных и ECI‑сегментов. Подтверждение версии предотвращает ошибки выполнения позже в процессе. + +## Шаг 2: Создание строки расширенного codetext + +Расширенный codetext позволяет комбинировать обычные ASCII‑данные с Unicode‑сегментами (ECI), что необходимо для многоязычных QR‑кодов. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Почему это важно:** +Метод `add_plain_codetext` сохраняет данные как стандартный ASCII, тогда как `add_eci_codetext` добавляет префикс Unicode‑блока с соответствующим обозначением ECI. Такой подход обеспечивает правильную интерпретацию японского текста сканерами QR, избегая искажённых символов. + +### Распространённые варианты + +- **Несколько ECI‑сегментов:** Вызывайте `add_eci_codetext` несколько раз, чтобы смешать несколько языков. +- **Разные идентификаторы ECI:** Используйте `27` для ISO‑8859‑1, `28` для ISO‑8859‑2 и т.д., в зависимости от требуемой кодировки. + +## Шаг 3: Генерация QR‑штрихкода с использованием расширенного codetext + +Теперь, когда у нас есть правильно отформатированная строка, мы можем создать QR‑код. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Почему это важно:** +`EncodeTypes.QR` указывает Aspose.BarCode использовать символьный набор QR. Передача `extended_codetext` напрямую связывает смешанные данные с матрицей QR, сохраняя как обычные, так и Unicode‑части. + +## Шаг 4: Настройка визуального вида (необязательно, но рекомендуется) + +Точная настройка визуальных параметров штрихкода улучшает надёжность сканирования и соответствует требованиям бренда. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Почему это важно:** +- **`x_dimension`** контролирует размер каждого модуля QR; слишком маленький размер может вызвать ошибки чтения на устройствах с низким разрешением. +- **`border_width`** добавляет тихую зону. Некоторые сканеры требуют минимум 4‑модульную тихую зону; библиотека добавляет её автоматически, но вы можете увеличить её для дополнительной надёжности. + +### Обработка граничных случаев + +- **Данные высокой плотности:** Если кодируемые данные велики, возможно, потребуется увеличить `x_dimension` или выбрать более высокий уровень коррекции ошибок (через `qr_generator.parameters.qr.error_correction_level`). +- **Прозрачный фон:** Установите `qr_generator.parameters.barcode.bg_color = Color.Transparent` для PNG‑файлов с альфа‑каналом. + +## Шаг 5: Сохранение изображения QR‑штрихкода + +Наконец, запишите изображение на диск в выбранном вами формате. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Почему это важно:** +Сохранение в PNG сохраняет без потерь, что идеально для QR‑кодов, требующих чётких краёв. Если нужен другой формат для веб‑приложения, просто измените перечисление `BarCodeImageFormat`. + +### Проверка результата + +Откройте сохранённый файл в любом просмотрщике изображений. Вы должны увидеть QR‑код, который при сканировании возвращает объединённую строку: + +``` +ABC12345 +こんにちは +``` + +Большинство современных приложений‑сканеров отображают сначала обычный сегмент, а затем корректно выводят японское приветствие. + +--- + +## Полный исполняемый скрипт + +Скопируйте весь блок ниже в файл с именем `create_qr_barcode.py` и запустите его командой `python create_qr_barcode.py`. Измените `YOUR_DIRECTORY` на папку, доступную для записи на вашем компьютере. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Запуск этого скрипта выводит версию, расширенный codetext и подтверждение создания PNG‑файла. + +--- + +## Заключение + +Теперь вы знаете, как **создать QR‑штрихкод** в Python с помощью Aspose.BarCode. В руководстве рассмотрено: + +1. Проверка версии библиотеки. +2. Создание расширенного codetext с обычными и ECI (Unicode) сегментами. +3. Генерация QR‑кода. +4. Настройка визуальных параметров, таких как размер модуля и ширина границы. +5. Сохранение окончательного изображения в формате PNG. + +Далее вы можете исследовать: + +- Изменение уровней коррекции ошибок (`qr_generator.parameters.qr.error_correction_level`). +- Добавление логотипа или фонового изображения (`qr_generator.parameters.qr.logo`). +- Экспорт в другие форматы, например SVG, для масштабируемой веб‑графики. +- Интеграцию генератора в endpoint Flask или Django для создания QR‑кодов «на лету». + +Экспериментируйте с различными полезными нагрузками данных и визуальными настройками, чтобы они соответствовали брендингу вашего приложения и требованиям сканирования. Приятного кодинга! + +## Что изучать дальше? + +Следующие учебники охватывают тесно связанные темы, построенные на техниках, продемонстрированных в этом руководстве. Каждый ресурс включает полностью работающие примеры кода с пошаговыми объяснениями, помогающими освоить дополнительные возможности API и исследовать альтернативные подходы к реализации в ваших проектах. + +- [Как создать расширенный codetext для dotcode с Aspose.BarCode для .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Создание штрихкода aspose .net — настройка текста DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Как создать тихую зону штрихкода для ITF-14 с использованием Aspose.BarCode для .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/spanish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..f97ec0b93 --- /dev/null +++ b/barcode/spanish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,266 @@ +--- +category: general +date: 2026-08-09 +description: Crea un código QR en Python usando Aspose.BarCode. Aprende cómo generar + un codetext extendido, ajustar la apariencia y guardar la imagen, todo en un solo + tutorial. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: es +lastmod: 2026-08-09 +og_description: Crea un código QR en Python con Aspose.BarCode. Esta guía muestra + cómo generar un codetext ampliado, establecer parámetros visuales y exportar la + imagen. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Crear código de barras QR con Aspose.BarCode en Python – ejemplo completo + de código +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Crear código de barras QR con Aspose.BarCode en Python – guía paso a paso +url: /es/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Crear código de barras QR con Aspose.BarCode en Python – guía paso a paso + +Si necesitas **crear un código de barras QR** en Python, este tutorial te guía a través de todo el proceso usando la biblioteca Aspose.BarCode. Ya sea que estés codificando IDs de productos, texto multilingüe o datos personalizados, verás cómo construir un codetext extendido, ajustar la configuración visual y guardar la imagen final en un único script ejecutable. + +El ejemplo también muestra cómo mostrar la versión de la biblioteca, lo que te ayuda a verificar que estás ejecutando una versión compatible. Al final de esta guía tendrás una imagen de código de barras QR lista para usar y una comprensión clara de cada opción de configuración. + +## Requisitos previos + +- Python 3.8+ instalado. +- El paquete `aspose-barcode` (instalar mediante `pip install aspose-barcode`). +- Familiaridad básica con la sintaxis de Python. +- Permiso de escritura en el directorio de salida donde se guardará el archivo PNG. + +> **Consejo profesional:** Usa un entorno virtual para evitar conflictos de versiones con otros proyectos. + +## Paso 1: Verificar la versión de la biblioteca Aspose.BarCode + +Mostrar la versión de la biblioteca garantiza que estás usando una versión que soporta codetext extendido y codificación QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Por qué es importante:** +Las versiones más antiguas pueden carecer de la clase `ExtCodetextBuilder` necesaria para segmentos mixtos de texto plano y ECI. Confirmar la versión evita errores en tiempo de ejecución más adelante en el flujo de trabajo. + +## Paso 2: Construir una cadena de codetext extendido + +Un codetext extendido te permite combinar datos ASCII simples con segmentos Unicode (ECI), lo cual es esencial para códigos QR multilingües. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Por qué es importante:** +El método `add_plain_codetext` almacena los datos como ASCII estándar, mientras que `add_eci_codetext` antepone un bloque Unicode con el designador ECI apropiado. Este enfoque garantiza que los escáneres QR interpreten correctamente el texto japonés, evitando caracteres corruptos. + +### Variaciones comunes + +- **Segmentos ECI múltiples:** Llama a `add_eci_codetext` varias veces para mezclar varios idiomas. +- **Identificadores ECI diferentes:** Usa `27` para ISO‑8859‑1, `28` para ISO‑8859‑2, etc., según la codificación objetivo. + +## Paso 3: Generar el código de barras QR usando el codetext extendido + +Ahora que tenemos una cadena correctamente formateada, podemos crear el código QR. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Por qué es importante:** +`EncodeTypes.QR` indica a Aspose.BarCode que use la simbología QR. Pasar el `extended_codetext` directamente vincula los datos mixtos a la matriz QR, preservando tanto la parte plana como la Unicode. + +## Paso 4: Ajustar la apariencia visual (opcional pero recomendado) + +Ajustar finamente los parámetros visuales del código de barras mejora la fiabilidad del escaneo y se alinea con las directrices de marca. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Por qué es importante:** +- **`x_dimension`** controla el tamaño de cada módulo QR; si es demasiado pequeño puede causar errores de lectura en dispositivos de baja resolución. +- **`border_width`** agrega una zona silenciosa. Algunos escáneres requieren al menos una zona silenciosa de 4 módulos; la biblioteca la agrega automáticamente, pero puedes aumentarla para mayor seguridad. + +### Manejo de casos límite + +- **Datos de alta densidad:** Si los datos codificados son grandes, puede que necesites aumentar `x_dimension` o elegir un nivel de corrección de errores más alto (a través de `qr_generator.parameters.qr.error_correction_level`). +- **Fondo transparente:** Configura `qr_generator.parameters.barcode.bg_color = Color.Transparent` para PNGs con canales alfa. + +## Paso 5: Guardar la imagen del código de barras QR + +Finalmente, escribe la imagen en disco en el formato que prefieras. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Por qué es importante:** +Guardar como PNG preserva la calidad sin pérdidas, lo cual es ideal para códigos QR que necesitan bordes nítidos. Si necesitas un formato diferente para una aplicación web, simplemente cambia la enumeración `BarCodeImageFormat`. + +### Verificando el resultado + +Abre el archivo guardado en cualquier visor de imágenes. Deberías ver un código QR que, al escanearlo, devuelve la cadena combinada: + +``` +ABC12345 +こんにちは +``` + +La mayoría de las aplicaciones modernas de escáner QR muestran primero el segmento plano y luego renderizan correctamente el saludo en japonés. + +--- + +## Script completo ejecutable + +Copia todo el bloque a continuación en un archivo llamado `create_qr_barcode.py` y ejecútalo con `python create_qr_barcode.py`. Ajusta `YOUR_DIRECTORY` a una carpeta con permisos de escritura en tu máquina. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Ejecutar este script muestra la versión, el codetext extendido y una confirmación de que el archivo PNG fue creado. + +--- + +## Conclusión + +Ahora sabes cómo **crear imágenes de código de barras QR** en Python usando Aspose.BarCode. El tutorial cubrió: + +1. Verificar la versión de la biblioteca. +2. Construir codetext extendido con segmentos planos y ECI (Unicode). +3. Generar el código QR. +4. Personalizar parámetros visuales como el tamaño del módulo y el ancho del borde. +5. Guardar la imagen final en formato PNG. + +Desde aquí puedes explorar: + +- Cambiar los niveles de corrección de errores (`qr_generator.parameters.qr.error_correction_level`). +- Añadir un logotipo o imagen de fondo (`qr_generator.parameters.qr.logo`). +- Exportar a otros formatos como SVG para gráficos web escalables. +- Integrar el generador en un endpoint Flask o Django para crear códigos QR al vuelo. + +Experimenta con diferentes cargas de datos y configuraciones visuales para adaptarlas a la marca y requisitos de escaneo de tu aplicación. ¡Feliz codificación! + +## ¿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 funcionales con explicaciones paso a paso para ayudarte a dominar características adicionales de la API y explorar enfoques de implementación alternativos en tus propios proyectos. + +- [Cómo crear codetext extendido de dotcode con Aspose.BarCode para .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Crear código de barras aspose .net - Configuración del texto de DataMatrix](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Cómo crear zona silenciosa de código de barras para ITF-14 usando Aspose.BarCode para .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/swedish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..2392a9e45 --- /dev/null +++ b/barcode/swedish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,263 @@ +--- +category: general +date: 2026-08-09 +description: Skapa QR‑streckkod i Python med Aspose.BarCode. Lär dig hur du bygger + utökad kodtext, justerar utseendet och sparar bilden – allt i en handledning. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: sv +lastmod: 2026-08-09 +og_description: Skapa QR-streckkod i Python med Aspose.BarCode. Denna guide visar + hur du bygger utökad kodtext, ställer in visuella parametrar och exporterar bilden. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Skapa QR-streckkod med Aspose.BarCode i Python – fullständigt kodexempel +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Skapa QR‑streckkod med Aspose.BarCode i Python – steg‑för‑steg guide +url: /sv/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Skapa QR‑streckkod med Aspose.BarCode i Python – steg‑för‑steg‑guide + +Om du behöver **skapa QR‑streckkod** i Python, guidar den här handledningen dig genom hela processen med hjälp av Aspose.BarCode‑biblioteket. Oavsett om du kodar produkt‑ID:n, flerspråkig text eller anpassade data, kommer du att se hur du bygger en utökad kodtext, justerar visuella inställningar och sparar den slutgiltiga bilden i ett enda körbart skript. + +Exemplet visar också hur du visar biblioteksversionen, vilket hjälper dig att verifiera att du kör en kompatibel version. I slutet av den här guiden har du en färdig‑att‑använda QR‑streckkodbild och en tydlig förståelse för varje konfigurationsalternativ. + +## Förutsättningar + +- Python 3.8+ installerat. +- Paketet `aspose-barcode` (installera via `pip install aspose-barcode`). +- Grundläggande kunskap om Python‑syntax. +- Skrivbehörighet till utmatningskatalogen där PNG‑filen kommer att sparas. + +> **Proffstips:** Använd en virtuell miljö för att undvika versionskonflikter med andra projekt. + +## Steg 1: Verifiera Aspose.BarCode‑bibliotekets version + +Att visa biblioteksversionen säkerställer att du använder en version som stöder utökad kodtext och QR‑kodning. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Varför detta är viktigt:** +Äldre versioner kan sakna klassen `ExtCodetextBuilder` som krävs för blandade vanliga och ECI‑segment. Att bekräfta versionen förhindrar körningsfel senare i arbetsflödet. + +## Steg 2: Bygg en utökad kodtextsträng + +En utökad kodtext låter dig kombinera vanlig ASCII‑data med Unicode‑(ECI‑)segment, vilket är nödvändigt för flerspråkiga QR‑koder. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Varför detta är viktigt:** +Metoden `add_plain_codetext` lagrar data som standard‑ASCII, medan `add_eci_codetext` prefixar ett Unicode‑block med rätt ECI‑designator. Detta tillvägagångssätt säkerställer att QR‑skannrar tolkar den japanska texten korrekt och undviker förvrängda tecken. + +### Vanliga varianter + +- **Flera ECI‑segment:** Anropa `add_eci_codetext` flera gånger för att blanda flera språk. +- **Olika ECI‑identifierare:** Använd `27` för ISO‑8859‑1, `28` för ISO‑8859‑2 osv., beroende på din mål‑kodning. + +## Steg 3: Generera QR‑streckkoden med den utökade kodtexten + +Nu när vi har en korrekt formaterad sträng kan vi skapa QR‑koden. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Varför detta är viktigt:** +`EncodeTypes.QR` instruerar Aspose.BarCode att använda QR‑symbolen. Genom att skicka `extended_codetext` direkt länkas den blandade datan till QR‑matrisen, vilket bevarar både den vanliga och Unicode‑delen. + +## Steg 4: Justera visuell utformning (valfritt men rekommenderat) + +Finjustering av streckkodens visuella parametrar förbättrar skanningspålitligheten och matchar varumärkesriktlinjer. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Varför detta är viktigt:** +- **`x_dimension`** styr storleken på varje QR‑modul; för liten kan orsaka läsfel på lågupplösta enheter. +- **`border_width`** lägger till en tyst zon. Vissa skannrar kräver minst en 4‑modul tyst zon; biblioteket lägger till detta automatiskt, men du kan öka det för extra säkerhet. + +### Hantering av kantfall + +- **Högdensitetsdata:** Om den kodade datan är stor kan du behöva öka `x_dimension` eller välja en högre felkorrigeringsnivå (via `qr_generator.parameters.qr.error_correction_level`). +- **Transparent bakgrund:** Ställ in `qr_generator.parameters.barcode.bg_color = Color.Transparent` för PNG‑filer med alfakanaler. + +## Steg 5: Spara QR‑streckkodbilden + +Skriv slutligen bilden till disk i ditt föredragna format. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Varför detta är viktigt:** +Att spara som PNG bevarar förlustfri kvalitet, vilket är idealiskt för QR‑koder som behöver skarpa kanter. Om du behöver ett annat format för en webbapplikation, ändra helt enkelt `BarCodeImageFormat`‑enumerationen. + +### Verifiera resultatet + +Öppna den sparade filen i någon bildvisare. Du bör se en QR‑kod som, när den skannas, returnerar den kombinerade strängen: + +``` +ABC12345 +こんにちは +``` + +De flesta moderna QR‑skanner‑appar visar först den vanliga delen och renderar sedan den japanska hälsningen korrekt. + +--- + +## Fullständigt körbart skript + +Kopiera hela blocket nedan till en fil med namnet `create_qr_barcode.py` och kör den med `python create_qr_barcode.py`. Anpassa `YOUR_DIRECTORY` till en skrivbar mapp på din maskin. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +När du kör detta skript skrivs versionen, den utökade kodtexten och en bekräftelse på att PNG‑filen har skapats ut. + +--- + +## Slutsats + +Du vet nu hur du **skapar QR‑streckkod**‑bilder i Python med hjälp av Aspose.BarCode. Handledningen täckte: + +1. Verifiera biblioteksversionen. +2. Bygga utökad kodtext med vanliga och ECI‑(Unicode)‑segment. +3. Generera QR‑koden. +4. Anpassa visuella parametrar såsom modulstorlek och kantbredd. +5. Spara den slutgiltiga bilden i PNG‑format. + +Härifrån kan du utforska: + +- Ändra felkorrigeringsnivåer (`qr_generator.parameters.qr.error_correction_level`). +- Lägga till en logotyp eller bakgrundsbild (`qr_generator.parameters.qr.logo`). +- Exportera till andra format som SVG för skalbara webb‑grafik. +- Integrera generatorn i en Flask‑ eller Django‑endpoint för QR‑skapande i realtid. + +Experimentera med olika datapayloads och visuella inställningar för att passa din applikations varumärke och skanningskrav. Lycka till med kodningen! + +## Vad bör du lära dig härnäst? + +Följande handledningar täcker närbesläktade ämnen som bygger på teknikerna som demonstrerats 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 behärska ytterligare API‑funktioner och utforska alternativa implementeringsmetoder i dina egna projekt. + +- [Hur man skapar dotcode utökad kodtext med Aspose.BarCode för .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Skapa streckkod Aspose .NET – Konfigurera DataMatrix‑kodtext](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Hur man skapar tyst zon för ITF-14‑streckkod med Aspose.BarCode för .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/thai/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..6405e9058 --- /dev/null +++ b/barcode/thai/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: สร้าง QR barcode ด้วย Python โดยใช้ Aspose.BarCode เรียนรู้วิธีสร้างโค้ดข้อความขยาย + ปรับลักษณะการแสดงผล และบันทึกภาพ—ทั้งหมดในบทเรียนเดียว. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: th +lastmod: 2026-08-09 +og_description: สร้าง QR barcode ใน Python ด้วย Aspose.BarCode คู่มือนี้แสดงวิธีสร้างโค้ดข้อความขยาย + ตั้งค่าพารามิเตอร์การแสดงผล และส่งออกภาพ +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: สร้างบาร์โค้ด QR ด้วย Aspose.BarCode ใน Python – ตัวอย่างโค้ดเต็ม +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: สร้างบาร์โค้ด QR ด้วย Aspose.BarCode ใน Python – คู่มือแบบทีละขั้นตอน +url: /th/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# สร้าง QR barcode ด้วย Aspose.BarCode ใน Python – คู่มือขั้นตอนโดยละเอียด + +หากคุณต้องการ **สร้าง QR barcode** ใน Python, บทแนะนำนี้จะพาคุณผ่านกระบวนการทั้งหมดโดยใช้ไลบรารี Aspose.BarCode ไม่ว่าคุณจะเข้ารหัสรหัสสินค้า, ข้อความหลายภาษา, หรือข้อมูลแบบกำหนดเอง, คุณจะได้เห็นวิธีสร้าง extended codetext, ปรับแต่งการตั้งค่าภาพ, และบันทึกภาพสุดท้ายในสคริปต์เดียวที่สามารถรันได้ + +ตัวอย่างนี้ยังแสดงวิธีแสดงเวอร์ชันของไลบรารี, ซึ่งช่วยให้คุณตรวจสอบว่ากำลังใช้เวอร์ชันที่เข้ากันได้หรือไม่. เมื่อจบคู่มือคุณจะมีภาพ QR barcode พร้อมใช้งานและเข้าใจการตั้งค่าต่าง ๆ อย่างชัดเจน + +## Prerequisites + +ก่อนเริ่ม, โปรดตรวจสอบว่าคุณมี: + +- ติดตั้ง Python 3.8+ แล้ว +- แพ็กเกจ `aspose-barcode` (ติดตั้งโดยใช้ `pip install aspose-barcode`) +- ความคุ้นเคยพื้นฐานกับไวยากรณ์ของ Python +- สิทธิ์การเขียนในไดเรกทอรีปลายทางที่ไฟล์ PNG จะถูกบันทึก + +> **Pro tip:** ใช้ virtual environment เพื่อหลีกเลี่ยงความขัดแย้งของเวอร์ชันกับโปรเจกต์อื่น ๆ + +## Step 1: Verify the Aspose.BarCode library version + +การแสดงเวอร์ชันของไลบรารีช่วยให้แน่ใจว่าคุณกำลังใช้รุ่นที่รองรับ extended codetext และการเข้ารหัส QR + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**ทำไมเรื่องนี้ถึงสำคัญ:** +รุ่นเก่าอาจไม่มีคลาส `ExtCodetextBuilder` ที่จำเป็นสำหรับส่วนผสมของ plain และ ECI segment การยืนยันเวอร์ชันช่วยป้องกันข้อผิดพลาดขณะรันในขั้นตอนต่อไป + +## Step 2: Build an extended codetext string + +Extended codetext ช่วยให้คุณรวมข้อมูล ASCII ธรรมดากับส่วน Unicode (ECI) ซึ่งจำเป็นสำหรับ QR code ที่หลายภาษา + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**ทำไมเรื่องนี้ถึงสำคัญ:** +เมธอด `add_plain_codetext` จะเก็บข้อมูลเป็น ASCII มาตรฐาน, ส่วน `add_eci_codetext` จะใส่คำนำหน้าบล็อก Unicode ด้วยตัวระบุ ECI ที่เหมาะสม วิธีนี้ทำให้เครื่องสแกน QR อ่านข้อความภาษาญี่ปุ่นได้อย่างถูกต้อง, ป้องกันอักขระเสียหาย + +### Common variations + +- **Multiple ECI segments:** เรียก `add_eci_codetext` หลายครั้งเพื่อผสานหลายภาษา +- **Different ECI identifiers:** ใช้ `27` สำหรับ ISO‑8859‑1, `28` สำหรับ ISO‑8859‑2 ฯลฯ ตามการเข้ารหัสที่ต้องการ + +## Step 3: Generate the QR barcode using the extended codetext + +เมื่อเรามีสตริงที่จัดรูปแบบอย่างถูกต้องแล้ว, เราก็สามารถสร้าง QR code ได้ + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**ทำไมเรื่องนี้ถึงสำคัญ:** +`EncodeTypes.QR` บอก Aspose.BarCode ให้ใช้สัญลักษณ์ QR. การส่ง `extended_codetext` โดยตรงเชื่อมข้อมูลผสมเข้ากับเมทริกซ์ QR, รักษาทั้งส่วน plain และ Unicode ไว้ + +## Step 4: Adjust visual appearance (optional but recommended) + +การปรับแต่งพารามิเตอร์ภาพของบาร์โค้ดช่วยเพิ่มความน่าเชื่อถือในการสแกนและสอดคล้องกับแนวทางแบรนด์ + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**ทำไมเรื่องนี้ถึงสำคัญ:** +- **`x_dimension`** ควบคุมขนาดของแต่ละโมดูล QR; ถ้าเล็กเกินไปอาจทำให้เกิดข้อผิดพลาดการอ่านบนอุปกรณ์ความละเอียดต่ำ +- **`border_width`** เพิ่ม quiet zone. เครื่องสแกนบางรุ่นต้องการ quiet zone อย่างน้อย 4 โมดูล; ไลบรารีจะเพิ่มให้โดยอัตโนมัติ, แต่คุณสามารถเพิ่มเพื่อความปลอดภัยเพิ่มเติมได้ + +### Edge case handling + +- **High‑density data:** หากข้อมูลที่เข้ารหัสมีขนาดใหญ่, คุณอาจต้องเพิ่ม `x_dimension` หรือเลือกระดับ error‑correction ที่สูงกว่า (โดยใช้ `qr_generator.parameters.qr.error_correction_level`) +- **Transparent background:** ตั้งค่า `qr_generator.parameters.barcode.bg_color = Color.Transparent` สำหรับ PNG ที่มีช่อง alpha + +## Step 5: Save the QR barcode image + +สุดท้าย, บันทึกภาพลงดิสก์ในรูปแบบที่คุณต้องการ + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**ทำไมเรื่องนี้ถึงสำคัญ:** +การบันทึกเป็น PNG จะรักษาคุณภาพ lossless, เหมาะสำหรับ QR code ที่ต้องการขอบคมชัด. หากต้องการรูปแบบอื่นสำหรับเว็บแอปพลิเคชัน, เพียงเปลี่ยนค่าใน enumeration `BarCodeImageFormat` + +### Verifying the result + +เปิดไฟล์ที่บันทึกไว้ด้วยโปรแกรมดูภาพใด ๆ คุณควรเห็น QR code ที่เมื่อสแกนแล้วจะคืนสตริงที่รวมกัน: + +``` +ABC12345 +こんにちは +``` + +แอปสแกน QR สมัยใหม่ส่วนใหญ่จะแสดงส่วน plain ก่อนและจากนั้นแสดงข้อความภาษาญี่ปุ่นอย่างถูกต้อง + +--- + +## Full runnable script + +คัดลอกบล็อกทั้งหมดด้านล่างไปยังไฟล์ชื่อ `create_qr_barcode.py` แล้วรันด้วยคำสั่ง `python create_qr_barcode.py`. ปรับค่า `YOUR_DIRECTORY` ให้เป็นโฟลเดอร์ที่สามารถเขียนได้บนเครื่องของคุณ + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +การรันสคริปต์นี้จะพิมพ์เวอร์ชัน, extended codetext, และข้อความยืนยันว่ามีการสร้างไฟล์ PNG แล้ว + +--- + +## Conclusion + +คุณได้เรียนรู้วิธี **สร้าง QR barcode** ใน Python ด้วย Aspose.BarCode แล้ว. บทแนะนำครอบคลุม: + +1. การตรวจสอบเวอร์ชันของไลบรารี +2. การสร้าง extended codetext ด้วยส่วน plain และ ECI (Unicode) +3. การสร้าง QR code +4. การปรับแต่งพารามิเตอร์ภาพ เช่น ขนาดโมดูลและความกว้างของ border +5. การบันทึกภาพสุดท้ายในรูปแบบ PNG + +ต่อจากนี้คุณสามารถสำรวจ: + +- การเปลี่ยนระดับ error‑correction (`qr_generator.parameters.qr.error_correction_level`) +- การเพิ่มโลโก้หรือภาพพื้นหลัง (`qr_generator.parameters.qr.logo`) +- การส่งออกเป็นรูปแบบอื่นเช่น SVG สำหรับกราฟิกเว็บแบบขยายได้ +- การรวม generator เข้ากับ endpoint ของ Flask หรือ Django เพื่อสร้าง QR แบบเรียลไทม์ + +ลองทดลองกับ payload ข้อมูลและการตั้งค่าภาพต่าง ๆ เพื่อให้สอดคล้องกับแบรนด์และความต้องการการสแกนของแอปพลิเคชันของคุณ. Happy coding! + +## What Should You Learn Next? + +บทแนะนำต่อไปนี้ครอบคลุมหัวข้อที่เกี่ยวข้องอย่างใกล้ชิดและต่อยอดจากเทคนิคที่แสดงในคู่มือนี้. แต่ละแหล่งข้อมูลมีตัวอย่างโค้ดทำงานเต็มรูปแบบพร้อมคำอธิบายขั้นตอนเพื่อช่วยคุณเชี่ยวชาญฟีเจอร์ API เพิ่มเติมและสำรวจวิธีการทำงานทางเลือกในโปรเจกต์ของคุณ + +- [วิธีสร้าง dotcode extended codetext ด้วย Aspose.BarCode สำหรับ .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [สร้าง Barcode ด้วย Aspose .NET - การกำหนดค่า DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [วิธีสร้าง Quiet Zone สำหรับ ITF-14 ด้วย Aspose.BarCode สำหรับ .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/turkish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..2969b41d5 --- /dev/null +++ b/barcode/turkish/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Aspose.BarCode kullanarak Python'da QR barkod oluşturun. Genişletilmiş + kod metnini nasıl oluşturacağınızı, görünümünü nasıl ayarlayacağınızı ve görüntüyü + nasıl kaydedeceğinizi öğrenin—hepsi tek bir öğreticide. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: tr +lastmod: 2026-08-09 +og_description: Python ile Aspose.BarCode kullanarak QR barkod oluşturun. Bu kılavuz, + genişletilmiş kod metnini nasıl oluşturacağınızı, görsel parametreleri nasıl ayarlayacağınızı + ve görüntüyü nasıl dışa aktaracağınızı gösterir. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Python'da Aspose.BarCode ile QR barkod oluşturma – tam kod örneği +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Python'da Aspose.BarCode ile QR barkod oluşturma – adım adım rehber +url: /tr/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Python'da Aspose.BarCode ile QR barkod oluşturma – adım adım rehber + +Python'da **QR barkod oluşturmanız** gerekiyorsa, bu öğretici Aspose.BarCode kütüphanesini kullanarak tüm süreci adım adım gösterir. Ürün kimliklerini, çok dilli metinleri veya özel verileri kodluyor olsanız da, genişletilmiş kod metni nasıl oluşturulur, görsel ayarlar nasıl ayarlanır ve son görüntünün tek bir çalıştırılabilir betikte nasıl kaydedileceğini göreceksiniz. + +Örnek ayrıca kütüphane sürümünün nasıl görüntüleneceğini gösterir; bu, uyumlu bir sürüm kullandığınızı doğrulamanıza yardımcı olur. Bu rehberin sonunda, kullanıma hazır bir QR barkod görüntüsüne ve her yapılandırma seçeneğinin net bir anlayışına sahip olacaksınız. + +## Önkoşullar + +- Python 3.8+ yüklü. +- `aspose-barcode` paketi (kurulum: `pip install aspose-barcode`). +- Python sözdizimi hakkında temel bilgi. +- PNG dosyasının kaydedileceği çıktı dizinine yazma izni. + +> **Pro ipucu:** Diğer projelerle sürüm çakışmalarını önlemek için bir sanal ortam kullanın. + +## 1. Adım: Aspose.BarCode kütüphane sürümünü doğrulama + +Kütüphane sürümünü görüntülemek, genişletilmiş kod metni ve QR kodlamasını destekleyen bir sürüm kullandığınızı garanti eder. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Neden önemli:** +Eski sürümlerde, düz ve ECI segmentlerinin karışımını desteklemek için gereken `ExtCodetextBuilder` sınıfı bulunmayabilir. Sürümü doğrulamak, iş akışının ilerleyen aşamalarında çalışma zamanı hatalarını önler. + +## 2. Adım: Genişletilmiş kod metni dizesi oluşturma + +Genişletilmiş bir kod metni, düz ASCII verisini Unicode (ECI) segmentleriyle birleştirmenizi sağlar; bu, çok dilli QR kodları için gereklidir. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Neden önemli:** +`add_plain_codetext` yöntemi veriyi standart ASCII olarak saklarken, `add_eci_codetext` Unicode bloğunu uygun ECI tanımlayıcısı ile önekler. Bu yaklaşım, QR tarayıcıların Japonca metni doğru yorumlamasını sağlar ve bozuk karakterlerin ortaya çıkmasını engeller. + +### Yaygın varyasyonlar + +- **Birden fazla ECI segmenti:** Birden çok dili karıştırmak için `add_eci_codetext` metodunu birden fazla kez çağırın. +- **Farklı ECI tanımlayıcıları:** Hedef kodlamanıza bağlı olarak ISO‑8859‑1 için `27`, ISO‑8859‑2 için `28` vb. kullanın. + +## 3. Adım: Genişletilmiş kod metni ile QR barkod oluşturma + +Artık doğru biçimlendirilmiş bir dizeye sahip olduğumuza göre, QR kodunu oluşturabiliriz. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Neden önemli:** +`EncodeTypes.QR`, Aspose.BarCode'e QR sembolünü kullanmasını söyler. `extended_codetext`'i doğrudan geçirmek, karışık veriyi QR matrisine bağlar ve hem düz hem de Unicode bölümlerinin korunmasını sağlar. + +## 4. Adım: Görsel görünümü ayarlama (isteğe bağlı ancak önerilir) + +Barkodun görsel parametrelerini ince ayar yapmak, tarama güvenilirliğini artırır ve marka yönergelerine uyum sağlar. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Neden önemli:** +- **`x_dimension`** her QR modülünün boyutunu kontrol eder; çok küçük olması düşük çözünürlüklü cihazlarda okuma hatalarına yol açabilir. +- **`border_width`** sessiz bir bölge ekler. Bazı tarayıcılar en az 4 modül sessiz bölge ister; kütüphane bunu otomatik ekler, ancak ekstra güvenlik için artırabilirsiniz. + +### Kenar durumları yönetimi + +- **Yüksek yoğunluklu veri:** Kodlanan veri büyükse, `x_dimension` değerini artırmanız veya daha yüksek bir hata düzeltme seviyesi seçmeniz ( `qr_generator.parameters.qr.error_correction_level` aracılığıyla) gerekebilir. +- **Şeffaf arka plan:** Alfa kanallı PNG'ler için `qr_generator.parameters.barcode.bg_color = Color.Transparent` ayarlayın. + +## 5. Adım: QR barkod görüntüsünü kaydetme + +Son olarak, görüntüyü tercih ettiğiniz formatta diske yazın. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Neden önemli:** +PNG olarak kaydetmek kayıpsız kaliteyi korur; bu, keskin kenarlara ihtiyaç duyan QR kodları için idealdir. Web uygulaması için farklı bir formata ihtiyacınız varsa, sadece `BarCodeImageFormat` enum'ını değiştirin. + +### Sonucu doğrulama + +Kaydedilen dosyayı herhangi bir görüntüleyicide açın. Tarandığında birleşik dizeyi döndüren bir QR kodu görmelisiniz: + +``` +ABC12345 +こんにちは +``` + +Çoğu modern QR tarayıcı uygulaması önce düz segmenti gösterir ve ardından Japonca selamlamayı doğru şekilde render eder. + +--- + +## Tam çalıştırılabilir betik + +Aşağıdaki tüm bloğu `create_qr_barcode.py` adlı bir dosyaya kopyalayın ve `python create_qr_barcode.py` ile çalıştırın. `YOUR_DIRECTORY` değerini makinenizde yazılabilir bir klasöre göre ayarlayın. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Bu betiği çalıştırdığınızda sürüm, genişletilmiş kod metni ve PNG dosyasının oluşturulduğuna dair bir onay mesajı yazdırılır. + +--- + +## Sonuç + +Artık Python'da Aspose.BarCode kullanarak **QR barkod** görüntüleri oluşturmayı biliyorsunuz. Öğreticide şunlar ele alındı: + +1. Kütüphane sürümünün doğrulanması. +2. Düz ve ECI (Unicode) segmentleriyle genişletilmiş kod metni oluşturma. +3. QR kodunun oluşturulması. +4. Modül boyutu ve kenar genişliği gibi görsel parametrelerin özelleştirilmesi. +5. Son görüntünün PNG formatında kaydedilmesi. + +Bundan sonra şunları keşfedebilirsiniz: + +- Hata düzeltme seviyelerini değiştirme (`qr_generator.parameters.qr.error_correction_level`). +- Logo veya arka plan resmi ekleme (`qr_generator.parameters.qr.logo`). +- SVG gibi ölçeklenebilir web grafikleri için diğer formatlara dışa aktarma. +- Flask veya Django uç noktasına entegre ederek anlık QR oluşturma. + +Uygulamanızın marka kimliğine ve tarama gereksinimlerine uygun farklı veri yükleri ve görsel ayarlarla deneyler yapın. Kodlamanın tadını çıkarın! + +## Sonraki Öğrenmeniz Gerekenler + +Aşağıdaki öğreticiler, bu rehberde gösterilen tekniklere dayanarak yakından ilgili konuları kapsar. Her kaynak, ek API özelliklerini öğrenmenize ve kendi projelerinizde alternatif uygulama yaklaşımlarını keşfetmenize yardımcı olmak için adım adım açıklamalar içeren tam çalışan kod örnekleri sunar. + +- [Aspose.BarCode ile .NET için dotcode genişletilmiş kod metni oluşturma](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Aspose .NET ile barkod oluşturma – DataMatrix kod metnini yapılandırma](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [Aspose.BarCode ile .NET için ITF-14 Barkod Sessiz Bölgesi Oluşturma](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md b/barcode/vietnamese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md new file mode 100644 index 000000000..a20dd9a12 --- /dev/null +++ b/barcode/vietnamese/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/_index.md @@ -0,0 +1,265 @@ +--- +category: general +date: 2026-08-09 +description: Tạo mã QR trong Python bằng Aspose.BarCode. Tìm hiểu cách xây dựng codetext + mở rộng, điều chỉnh giao diện và lưu hình ảnh—tất cả trong một hướng dẫn. +draft: false +images: +- PLACEHOLDER_URL/og-image.png +keywords: +- create QR barcode +- Aspose.BarCode Python +- extended codetext QR +- QR code generation Python +- barcode visual customization +language: vi +lastmod: 2026-08-09 +og_description: Tạo mã QR trong Python với Aspose.BarCode. Hướng dẫn này chỉ cách + xây dựng codetext mở rộng, thiết lập các tham số hiển thị và xuất hình ảnh. +og_image_alt: Screenshot of a generated QR barcode created with Aspose.BarCode in + Python +og_title: Tạo mã QR bằng Aspose.BarCode trong Python – ví dụ mã đầy đủ +schemas: +- author: Aspose + dateModified: '2026-08-09' + description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + headline: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + type: TechArticle +- description: Create QR barcode in Python using Aspose.BarCode. Learn how to build + extended codetext, adjust appearance, and save the image—all in one tutorial. + name: Create QR barcode with Aspose.BarCode in Python – step‑by‑step guide + steps: + - name: Common variations + text: '- **Multiple ECI segments:** Call `add_eci_codetext` multiple times to + mix several languages. - **Different ECI identifiers:** Use `27` for ISO‑8859‑1, + `28` for ISO‑8859‑2, etc., depending on your target encoding.' + - name: Edge case handling + text: '- **High‑density data:** If the encoded data is large, you may need to + increase `x_dimension` or choose a higher error‑correction level (via `qr_generator.parameters.qr.error_correction_level`). + - **Transparent background:** Set `qr_generator.parameters.barcode.bg_color + = Color.Transparent` for PNGs' + - name: Verifying the result + text: 'Open the saved file in any image viewer. You should see a QR code that, + when scanned, returns the combined string:' + type: HowTo +tags: +- QR code +- Python +- Aspose +- Barcode generation +title: Tạo mã QR bằng Aspose.BarCode trong Python – hướng dẫn từng bước +url: /vi/python/general/create-qr-barcode-with-aspose-barcode-in-python-step-by-step/ +--- + +{{< blocks/products/pf/main-wrap-class >}} +{{< blocks/products/pf/main-container >}} +{{< blocks/products/pf/tutorial-page-section >}} + +# Tạo QR barcode với Aspose.BarCode trong Python – hướng dẫn từng bước + +Nếu bạn cần **tạo QR barcode** trong Python, hướng dẫn này sẽ dẫn bạn qua toàn bộ quá trình sử dụng thư viện Aspose.BarCode. Cho dù bạn đang mã hoá ID sản phẩm, văn bản đa ngôn ngữ, hoặc dữ liệu tùy chỉnh, bạn sẽ thấy cách xây dựng một extended codetext, điều chỉnh các thiết lập hình ảnh, và lưu ảnh cuối cùng trong một script có thể chạy được. + +Ví dụ cũng minh họa cách hiển thị phiên bản của thư viện, giúp bạn xác nhận rằng bạn đang chạy một bản phát hành tương thích. Khi kết thúc hướng dẫn này, bạn sẽ có một hình ảnh QR barcode sẵn sàng sử dụng và hiểu rõ từng tùy chọn cấu hình. + +## 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+ đã được cài đặt. +- Gói `aspose-barcode` (cài đặt bằng `pip install aspose-barcode`). +- Kiến thức cơ bản về cú pháp Python. +- Quyền ghi vào thư mục đầu ra nơi file PNG sẽ được lưu. + +> **Mẹo chuyên nghiệp:** Sử dụng môi trường ảo để tránh xung đột phiên bản với các dự án khác. + +## Bước 1: Xác minh phiên bản thư viện Aspose.BarCode + +Hiển thị phiên bản thư viện đảm bảo bạn đang sử dụng bản phát hành hỗ trợ extended codetext và mã hoá QR. + +```python +from asposebarcode import BuildVersionInfo + +# Show the current Aspose.BarCode version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) +``` + +**Tại sao điều này quan trọng:** +Các bản phát hành cũ có thể thiếu lớp `ExtCodetextBuilder` cần thiết cho các đoạn plain và ECI hỗn hợp. Xác nhận phiên bản giúp ngăn ngừa lỗi thời gian chạy sau này trong quy trình. + +## Bước 2: Xây dựng chuỗi extended codetext + +Extended codetext cho phép bạn kết hợp dữ liệu ASCII thuần với các đoạn Unicode (ECI), điều này rất cần thiết cho các QR code đa ngôn ngữ. + +```python +from asposebarcode import ExtCodetextBuilder + +# Initialize the builder +ext_builder = ExtCodetextBuilder() + +# Add a plain segment – typically a product ID or numeric code +ext_builder.add_plain_codetext("ABC12345") + +# Add an ECI segment – here we embed Japanese greeting "こんにちは" +# 26 is the ECI identifier for UTF‑8 encoding +ext_builder.add_eci_codetext(26, "こんにちは") + +# Retrieve the full extended codetext that the QR generator will use +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") +``` + +**Tại sao điều này quan trọng:** +Phương thức `add_plain_codetext` lưu dữ liệu dưới dạng ASCII tiêu chuẩn, trong khi `add_eci_codetext` thêm tiền tố cho khối Unicode bằng bộ định danh ECI phù hợp. Cách tiếp cận này giúp máy quét QR giải mã đúng văn bản tiếng Nhật, tránh các ký tự bị rối. + +### Các biến thể phổ biến + +- **Nhiều đoạn ECI:** Gọi `add_eci_codetext` nhiều lần để trộn nhiều ngôn ngữ. +- **Các bộ định danh ECI khác nhau:** Sử dụng `27` cho ISO‑8859‑1, `28` cho ISO‑8859‑2, v.v., tùy thuộc vào mã hoá mục tiêu của bạn. + +## Bước 3: Tạo QR barcode bằng extended codetext + +Bây giờ chúng ta đã có một chuỗi được định dạng đúng, chúng ta có thể tạo QR code. + +```python +from asposebarcode import BarCodeGenerator, EncodeTypes, BarCodeImageFormat + +# Create the QR generator with the extended codetext +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) +``` + +**Tại sao điều này quan trọng:** +`EncodeTypes.QR` báo cho Aspose.BarCode sử dụng ký hiệu QR. Truyền `extended_codetext` trực tiếp liên kết dữ liệu hỗn hợp với ma trận QR, bảo tồn cả phần plain và Unicode. + +## Bước 4: Điều chỉnh giao diện hình ảnh (tùy chọn nhưng được khuyến nghị) + +Tinh chỉnh các tham số hình ảnh của barcode cải thiện độ tin cậy khi quét và phù hợp với hướng dẫn thương hiệu. + +```python +# Set module (pixel) size – larger values increase overall image size +qr_generator.parameters.barcode.x_dimension = 4 # each module = 4 pixels + +# Set border thickness – a thin white border helps scanners isolate the QR code +qr_generator.parameters.barcode.border_width = 2 # 2-pixel border +``` + +**Tại sao điều này quan trọng:** +- **`x_dimension`** kiểm soát kích thước của mỗi mô-đun QR; quá nhỏ có thể gây lỗi đọc trên thiết bị độ phân giải thấp. +- **`border_width`** thêm vùng yên tĩnh. Một số máy quét yêu cầu ít nhất 4 mô-đun vùng yên tĩnh; thư viện tự động thêm, nhưng bạn có thể tăng để an toàn hơn. + +### Xử lý các trường hợp biên + +- **Dữ liệu mật độ cao:** Nếu dữ liệu được mã hoá lớn, bạn có thể cần tăng `x_dimension` hoặc chọn mức sửa lỗi cao hơn (qua `qr_generator.parameters.qr.error_correction_level`). +- **Nền trong suốt:** Đặt `qr_generator.parameters.barcode.bg_color = Color.Transparent` cho PNG có kênh alpha. + +## Bước 5: Lưu ảnh QR barcode + +Cuối cùng, ghi ảnh ra đĩa ở định dạng bạn muốn. + +```python +# Define output path – replace YOUR_DIRECTORY with an actual folder +output_file = "YOUR_DIRECTORY/extended_qr.png" + +# Save as PNG; other formats include JPEG, BMP, GIF, TIFF +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +**Tại sao điều này quan trọng:** +Lưu dưới dạng PNG giữ chất lượng không mất dữ liệu, lý tưởng cho QR code cần các cạnh sắc nét. Nếu bạn cần định dạng khác cho ứng dụng web, chỉ cần thay đổi giá trị trong enum `BarCodeImageFormat`. + +### Xác minh kết quả + +Mở file đã lưu bằng bất kỳ trình xem ảnh nào. Bạn sẽ thấy một QR code mà khi quét sẽ trả về chuỗi kết hợp: + +``` +ABC12345 +こんにちは +``` + +Hầu hết các ứng dụng quét QR hiện đại sẽ hiển thị đoạn plain trước và sau đó hiển thị lời chào tiếng Nhật một cách chính xác. + +--- + +## Script có thể chạy đầy đủ + +Sao chép toàn bộ khối bên dưới vào một file có tên `create_qr_barcode.py` và chạy bằng `python create_qr_barcode.py`. Điều chỉnh `YOUR_DIRECTORY` thành thư mục có quyền ghi trên máy của bạn. + +```python +# create_qr_barcode.py +from asposebarcode import ( + BuildVersionInfo, + ExtCodetextBuilder, + BarCodeGenerator, + EncodeTypes, + BarCodeImageFormat, +) + +# 1️⃣ Display library version +version_info = BuildVersionInfo() +print( + f"Aspose.BarCode version: {version_info.PRODUCT} " + f"{version_info.PRODUCT_MAJOR}.{version_info.PRODUCT_MINOR} " + f"(released {version_info.RELEASE_DATE})" +) + +# 2️⃣ Build extended codetext (plain + Japanese Unicode) +ext_builder = ExtCodetextBuilder() +ext_builder.add_plain_codetext("ABC12345") +ext_builder.add_eci_codetext(26, "こんにちは") +extended_codetext = ext_builder.get_extended_codetext() +print(f"Generated extended codetext: {extended_codetext}") + +# 3️⃣ Create QR generator +qr_generator = BarCodeGenerator(EncodeTypes.QR, extended_codetext) + +# 4️⃣ Optional visual tweaks +qr_generator.parameters.barcode.x_dimension = 4 +qr_generator.parameters.barcode.border_width = 2 + +# 5️⃣ Save image +output_file = "YOUR_DIRECTORY/extended_qr.png" +qr_generator.save(output_file, BarCodeImageFormat.PNG) +print(f"Barcode saved to {output_file}") +``` + +Chạy script này sẽ in ra phiên bản, extended codetext, và xác nhận rằng file PNG đã được tạo. + +--- + +## Kết luận + +Bạn giờ đã biết cách **tạo QR barcode** trong Python bằng Aspose.BarCode. Hướng dẫn đã bao gồm: + +1. Xác minh phiên bản thư viện. +2. Xây dựng extended codetext với các đoạn plain và ECI (Unicode). +3. Tạo QR code. +4. Tùy chỉnh các tham số hình ảnh như kích thước mô-đun và độ rộng viền. +5. Lưu ảnh cuối cùng ở định dạng PNG. + +Từ đây bạn có thể khám phá: + +- Thay đổi mức sửa lỗi (`qr_generator.parameters.qr.error_correction_level`). +- Thêm logo hoặc ảnh nền (`qr_generator.parameters.qr.logo`). +- Xuất ra các định dạng khác như SVG cho đồ họa web có thể mở rộng. +- Tích hợp trình tạo vào endpoint Flask hoặc Django để tạo QR ngay lập tức. + +Thử nghiệm với các payload dữ liệu và thiết lập hình ảnh khác nhau để phù hợp với thương hiệu và yêu cầu quét của ứng dụng của bạn. Chúc bạn lập trình vui vẻ! + +## 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. + +- [How to create dotcode extended codetext with Aspose.BarCode for .NET](/barcode/english/net/dotcode-barcode-configuration/dotcode-extended-code-text-configuration/) +- [Create barcode aspose .net - Configuring DataMatrix Code Text](/barcode/english/net/datamatrix-barcode-configuration/datamatrix-extended-code-text-configuration/) +- [How to Create Barcode Quiet Zone for ITF-14 Using Aspose.BarCode for .NET](/barcode/english/net/itf-14-barcode-customization/itf-14-barcode-quiet-zone-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